01-04-2016 09:35 AM - edited 01-04-2016 09:37 AM
I need to write a programm that changes every letter in a string with the next letter in the alphabet. ('a' changes to 'b' and so on) Can anyone help? (Labview 14.0)
Solved! Go to Solution.
01-04-2016 09:39 AM
z becomes a ?
Same for capitals ?
Numbers and other signs remain unchanged ?
01-04-2016 09:41 AM
yes, z become a, same for capitals and there are no numbers and symbols in the text file.
01-04-2016 09:42 AM
01-04-2016 09:42 AM - edited 01-04-2016 09:43 AM
Hi daiana,
convert the string to an U8 array and add 1. Then convert back to string…
yes, z become a, same for capitals and there are no numbers and symbols in the text file.
This becomes a different problem. Now I would use a lookup table (but still work with conversion to U8 array).
01-04-2016 09:44 AM
01-04-2016 09:46 AM - edited 01-04-2016 09:54 AM
Use String To Byte Array to make an array of characters. Then use a FOR loop (autoindexing) to do the conversion. You will want a case structure to handle the z cases differently from the default and leave punctuation alone. Autoindex the results out of the loop and then use Byte Array To String.
01-04-2016 09:53 AM - edited 01-04-2016 09:55 AM
This will work with any characters in the text.
PS : Am I to generous by providing a code ?
01-04-2016 09:59 AM
Congratulations crossrulz for being faster !