diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
commit | 236b10503612706ed914678d942ac604f2973f47 (patch) | |
tree | e557381dbdc721002346a0fc64b1a679280fa3f1 /modern/src/common/stringUtils.js | |
parent | 96af05dbf2171c4e194cf67c3c93d134ef467e50 (diff) | |
download | trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.gz trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.bz2 trackermap-web-236b10503612706ed914678d942ac604f2973f47.zip |
Implement notification settings
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); +} |