0

Javascript char to uppercase change

Writing a module that does string matches and what not. So there are some arguements such as converting the whole string to upper/lower casing. However i want to also be able to switch between casing whole string and a specific word i have already found a match for in the string and knkw the start and end index. how to go about it? myVariable.toUpperCase() and variable.charAt(positio).toUpperCase() does not seem to work

6th Feb 2020, 11:36 AM
Antony O. Onyango
Antony O. Onyango - avatar
1 ответ
0
Martin Taylor and what if my target word (part 2/3) is a char? if the algorith already knows the indexes and i want to do casing conversion on only the searched word. How do i go about that? Because i only know the indexes i tried to iterate through it and do an uppercase conversion on each char. Or could i pass A few indexes into a .toUpperCase() ?
7th Feb 2020, 6:59 PM
Antony O. Onyango
Antony O. Onyango - avatar