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
 

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

Similar Threads

Get first N words of a string 8
String 2
String 2
String size 1
Remove spaces 1
Check if String is Empty 2
Separate String 3
Replace String 4

Back
Top