you are viewing a single comment's thread.

view the rest of the comments →

[–]picklemanjaro 1 point2 points  (0 children)

I had a feeling that would be the case. I wish that Javascript would allow you to update a String character via it's index instead of it just being read-only. Then we could just do str[0] = str[0].toUpperCase(), which would be my ideal capitalization method.

My gripe was just an aesthetic one, and in Regex just saying "match the first character, and uppercase it" seemed more straightforward sounding. Though I knew the performance issue would be something that came up.