What does it mean when you hear tokenize

Simple question, but I just want to be sure I understand correctly what it means you hear people say tokenize. Does it simply mean to split a string into pieces?

for example:

+(NSArray*)tokenizeTheStringNSString *)mainString tokenNSString *)token
{
    return [mainString componentsSeparatedByString:token];
}

Open in new window


means what?
Mark_CoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

evilrixSenior Software Engineer (Avast)Commented:
It does means to break into pieces but those pieces generally have semantic and context based meaning.
0
Mark_CoAuthor Commented:
so what is that meaning in the above code example?
0
evilrixSenior Software Engineer (Avast)Commented:
From that small code snippet I'm not able to tell I'm afraid.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Mark_CoAuthor Commented:
so if this method was called like this

NSARRAY *rows = [someclass tokenizeTheString:values token: @"++"];

Open in new window


would that mean i was telling the compiler to split up pieces of a string wherever it find a string of ++?
0
evilrixSenior Software Engineer (Avast)Commented:
I don't really know objective C, but that would be my understanding. You might want to wait for an objective C expert to clarify, though.
0
Mark_CoAuthor Commented:
ok thanks.
0
pgnatyukCommented:
It's exactly that. :)
This is a class method that will convert a string into an array. For example it will make an array of words from a sentence if the token is space.
There is a mistake and this code will cause a compilation error. Should be
+(NSArray*)tokenizeTheString:(NSString *)mainString token:(NSString *)token
{
    return [mainString componentsSeparatedByString:token];
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.