35
rated 0 times
[
39]
[
4]
/ answers: 1 / hits: 88208
/ 13 Years ago, tue, july 12, 2011, 12:00:00
With regex (i assume) or some other method, how can i convert things like:
marker-image
or my-example-setting
to markerImage
or myExampleSetting
.
I was thinking about just splitting by -
then convert the index of that hypen +1 to uppercase. But it seems pretty dirty and was hoping for some help with regex that could make the code cleaner.
No jQuery...
More From » regex