git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
9815a42
Branches
Tags
develop-client_server
master
typescript
fs-words.git
source
helpers
string.ts
[add] typescript logic
Christian Fraß
commited
9815a42
at 2021-03-03 00:27:18
string.ts
Blame
History
Raw
namespace helpers.string { /** */ export function coin ( template : string, arguments_ : {[key : string] : string}, open : string = "{{", close : string = "}}" ) : string { let result : string = template; for (let [key, value] of Object.entries(arguments_)) { const pattern : string = (open + key + close); result = result.replace(new RegExp(pattern, "g"), value); } return result; } }