aboutsummaryrefslogtreecommitdiff
path: root/utils/stringUtils.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-10-31 09:49:42 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-10-31 09:49:42 +0800
commit48653ec89538f1650106a5e77463412cad4684c2 (patch)
tree09687cd579462e04d539fd4615369fa6dae13902 /utils/stringUtils.js
downloadSoopyV2-48653ec89538f1650106a5e77463412cad4684c2.tar.gz
SoopyV2-48653ec89538f1650106a5e77463412cad4684c2.tar.bz2
SoopyV2-48653ec89538f1650106a5e77463412cad4684c2.zip
first commit
Diffstat (limited to 'utils/stringUtils.js')
-rw-r--r--utils/stringUtils.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/stringUtils.js b/utils/stringUtils.js
new file mode 100644
index 0000000..920dd50
--- /dev/null
+++ b/utils/stringUtils.js
@@ -0,0 +1,11 @@
+module.exports = {
+
+ firstLetterCapital: function (string) {
+ return string.substr(0, 1).toUpperCase() + string.substr(1)
+ },
+
+ firstLetterWordCapital: function (string) {
+ return string.split(" ").map(firstLetterCapital).join(" ")
+ }
+
+} \ No newline at end of file