I'm looking at the swift app to capitalize every other letter in the JavaScript I will use the following: < / P>
var word = "hello world" word = word. Location (/ [AG] / g, function (c, i) {return i% 2 = == 0? C.toUpperCase (): c;});
Returns:
"Hello Woolld"
How do you implement it in Swift?
A big thanks in advance, I have slipped on the web for an answer and one can not get one, so any help would be greatly appreciated.
If you are searching for a letter change from two to upper case, then do this trick Should: Demo: However, if you want to search only the
No comments:
Post a Comment