reset
This commit is contained in:
parent
9dd0c78850
commit
49fffc20a3
19 changed files with 2551 additions and 12482 deletions
9
app/utils/strings.ts
Normal file
9
app/utils/strings.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
export const toTitleCase = (str: string) => {
|
||||
return str.replace(/\w\S*/g, (txt) => {
|
||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||
});
|
||||
};
|
||||
|
||||
export const pascalCaseToTitleCase = (str: string) => {
|
||||
return toTitleCase(str.replace(/([A-Z])/g, " $1"));
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue