diff options
Diffstat (limited to 'modern/src/common/stringUtils.js')
-rw-r--r-- | modern/src/common/stringUtils.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modern/src/common/stringUtils.js b/modern/src/common/stringUtils.js new file mode 100644 index 00000000..7bd68c85 --- /dev/null +++ b/modern/src/common/stringUtils.js @@ -0,0 +1,7 @@ +export const prefixString = (prefix, value) => { + return prefix + value.charAt(0).toUpperCase() + value.slice(1); +} + +export const unprefixString = (prefix, value) => { + return value.charAt(prefix.length).toLowerCase() + value.slice(prefix.length + 1); +} |