Many times I find I have a need to parse a
string, looking for another string value inside, or compare strings. I know that String actions eat
alot of time/resources, so I'm looking for a way to speed this up. One idea I had was to convert all my Strings to byte[] objects, but I have no idea if this is faster, nor if it's the quickest way to do this. Does anyone know the best way?
For example, let's say I have a String that comes in from an email that is this:
"Hey Robert,\r\nWhat's been going on?\r\n"
I want to find all the cases of "\r\n" or, if the program that sent the message used "\n" instead of "\r\n", then i want to find all those. What's the fastest way to do this?
Thanks in advance!