Migrate help command
This commit is contained in:
parent
acedbffdad
commit
6c90307754
3 changed files with 133 additions and 150 deletions
15
src/helpers/StringTools.ts
Normal file
15
src/helpers/StringTools.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
export default class StringTools {
|
||||
public static Capitalise(str: string): string {
|
||||
const words = str.split(" ");
|
||||
let result: string[] = [];
|
||||
|
||||
words.forEach(word => {
|
||||
const firstLetter = word.substring(0, 1).toUpperCase();
|
||||
const rest = word.substring(1);
|
||||
|
||||
result.push(firstLetter + rest);
|
||||
});
|
||||
|
||||
return result.join(" ");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue