Can someone show me an example of a regex or script to capitalize single words?
Regex or the like to capitalize names?
KarenBarker
(Karen Barker)
#2
Hi there,
You can actually use the Text service to capitalise words within Flow XO.
Alternatively if you are trying to use the code service here you could do something like the following:
var a = "hello";
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
resolve (capitalizeFirstLetter(a));
Hope this helps
1 Like