Remove first word of a string

  • Thread starter Thread starter shapper
  • Start date Start date
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
 
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
 
Back
Top