Remove first word of a string

S

shapper

Hello,

I want to remove the first word of a string.

For example:

MyString = "Hello World! How are you?"

I need to create 2 string:
MyString1 = "Hello"
MyString2 = " World! How are you?"

I was able to get the first word but not to remove it from the original
string.
Could someone help me out?

Thanks,
Miguel
 
J

Jon Paal

is this a homework asignment ...?

use the split function on the space character
 
S

Siva M

Assuming single-space is a word sep character, s.Remove (0, s.IndexOf ('
')+1) will get rid of the first word.

HTH.

Hello,

I want to remove the first word of a string.

For example:

MyString = "Hello World! How are you?"

I need to create 2 string:
MyString1 = "Hello"
MyString2 = " World! How are you?"

I was able to get the first word but not to remove it from the original
string.
Could someone help me out?

Thanks,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top