mirror of
				https://github.com/MartinKral/Slash-The-Hordes
				synced 2025-10-31 03:16:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			9 lines
		
	
	
		
			254 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			254 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| export function formatString(text: string, params: string[]): string {
 | |
|     let textWithParams = text;
 | |
|     for (let i = 0; i < params.length; i++) {
 | |
|         textWithParams = textWithParams.replace(`{${i}}`, params[i]);
 | |
|     }
 | |
| 
 | |
|     return textWithParams;
 | |
| }
 |