c# getting a string within another string

Posted by I__ on Stack Overflow See other posts from Stack Overflow or by I__
Published on 2010-06-16T04:37:36Z Indexed on 2010/06/16 4:42 UTC
Read the original article Hit count: 263

Filed under:

i have a string like this:

 some_string = "A simple demo of SMS text messaging.\r\n+CMGW: 3216\r\n\r\nOK\r\n\"

im coming from vb.net and i need to know in c#, if i know the position of CMGW, how do i get "3215" out of there?

i know that my start should be the position of CMGW + 6, but how do i make it stop as soon as it finds "\r" ??

again, my end result should be 3216

thank you!

© Stack Overflow or respective owner

Related posts about c#