aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/stringUtils.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/common/stringUtils.js')
-rw-r--r--modern/src/common/stringUtils.js7
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 0000000..7bd68c8
--- /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);
+}