Source  
Edit  
    
    
    modified from std/strutils, adding count param
    
  
  
    
  
  - func replace(s: string; sub, by: char; count: Natural): string {....raises: [],
    tags: [], forbids: [].}
- 
    
    
    Source  
Edit  
  
 
  - func replace(s: string; sub, by: string; count: Natural): string {....raises: [],
    tags: [], forbids: [].}
- 
    
    count must be Natural
    Source  
Edit