Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- std::string to_camel_case(std::string text) {
- for(int i = 0; i < text.length(); ++i)
- {
- if(text[i] == '-' || text[i] == '_')
- {
- text.erase(i,1);
- text[i] = std::toupper(text[i]);
- }
- }
- return text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement