how to split a string on the basis of camel case
Spliting of a string
Letβs assume that the name of the string is str.
You have to do the following steps to split and print according to the camelCase :
- iterate the string
- keep printing str[i] and simultaneously keep checking the value of str[i+1]. If the value of str[i+1] falls inbetween βAβ and βZβ then print endl.
Hope this helps.