How can I compare two strings and capitalize the second one in the same places as the first one?
1
Expert's answer
2017-09-14T10:05:06-0400
You can hard code two arrays with ascii values of alphabet (from 65 to 90 upper case, and from 97 to 122 lower case). Then you should use charAt method and compare values of each character of string with each of two arrays. If the symbol is equal with string character, you should decide from what array you need to take value (indexes will overlap, and u should decide upper or lower case you should use)
Comments
Leave a comment