mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2026-02-14 12:22:42 +00:00
Meta upgrades
This commit is contained in:
8
assets/Scripts/Services/Utils/StringUtils.ts
Normal file
8
assets/Scripts/Services/Utils/StringUtils.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user