Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
GeneralRe: Beginners ListBox question [modified] Pin
Gareth H18-Mar-08 3:42
Gareth H18-Mar-08 3:42 
General[Message Deleted] Pin
NewToAspDotNet18-Mar-08 4:21
NewToAspDotNet18-Mar-08 4:21 
GeneralRe: Beginners ListBox question Pin
Gareth H18-Mar-08 4:36
Gareth H18-Mar-08 4:36 
General[Message Deleted] Pin
NewToAspDotNet18-Mar-08 4:49
NewToAspDotNet18-Mar-08 4:49 
GeneralRe: Beginners ListBox question Pin
Gareth H18-Mar-08 5:40
Gareth H18-Mar-08 5:40 
GeneralSerialPort Info Pin
half-life18-Mar-08 2:36
half-life18-Mar-08 2:36 
GeneralRe: SerialPort Info Pin
dave.kelly18-Mar-08 3:57
professionaldave.kelly18-Mar-08 3:57 
GeneralRe: SerialPort Info Pin
half-life18-Mar-08 6:43
half-life18-Mar-08 6:43 
Generalstring not getting system date Pin
Cuckoo18-Mar-08 1:48
Cuckoo18-Mar-08 1:48 
GeneralRe: string not getting system date Pin
Colin Angus Mackay18-Mar-08 1:51
Colin Angus Mackay18-Mar-08 1:51 
GeneralRe: string not getting system date Pin
EvilInside18-Mar-08 1:57
EvilInside18-Mar-08 1:57 
GeneralRe: string not getting system date Pin
DaveyM6918-Mar-08 2:32
professionalDaveyM6918-Mar-08 2:32 
GeneralRe: string not getting system date Pin
laserbaronen18-Mar-08 2:32
laserbaronen18-Mar-08 2:32 
GeneralRe: string not getting system date Pin
PIEBALDconsult18-Mar-08 5:26
mvePIEBALDconsult18-Mar-08 5:26 
GeneralRe: string not getting system date Pin
Luc Pattyn18-Mar-08 12:32
sitebuilderLuc Pattyn18-Mar-08 12:32 
Generalabstract method in non abstract class Pin
mukkanti00718-Mar-08 1:39
mukkanti00718-Mar-08 1:39 
GeneralRe: abstract method in non abstract class Pin
Colin Angus Mackay18-Mar-08 1:48
Colin Angus Mackay18-Mar-08 1:48 
GeneralRe: abstract method in non abstract class Pin
PIEBALDconsult18-Mar-08 5:37
mvePIEBALDconsult18-Mar-08 5:37 
GeneralRe: abstract method in non abstract class Pin
Guffa18-Mar-08 6:40
Guffa18-Mar-08 6:40 
GeneralHashtables and DataGridView Pin
Baconbutty18-Mar-08 1:20
Baconbutty18-Mar-08 1:20 
GeneralRe: Hashtables and DataGridView Pin
James Bond 00718-Mar-08 6:14
James Bond 00718-Mar-08 6:14 
GeneralRe: Hashtables and DataGridView Pin
mmikey718-Mar-08 6:53
mmikey718-Mar-08 6:53 
GeneralPopulate PropertyGrid from XML Pin
firozu18-Mar-08 0:49
firozu18-Mar-08 0:49 
GeneralRe: Populate PropertyGrid from XML Pin
mmikey718-Mar-08 7:02
mmikey718-Mar-08 7:02 
Generalsplitting long string into parts Pin
stephan_00718-Mar-08 0:35
stephan_00718-Mar-08 0:35 
hi everyone!

i would like to do the following task:

i do have a string and want to divide it into parts

e.g. "test me for more tests to get the test results after having completed the test task" should be divided up into
"test me for more"
"tests to get the"
"test results after having completed the"
"test task"

The string.split() functions splits by characters, but i want to split a string by word or even a whole line without having to parse the string line by line to divide it up.

e.g.
"test me for more tests to get the test results after having completed the test task
next one: test me for more tests to get the test results after having completed the test task
and again: test me for more tests to get the test results after having completed the test task"

should be divided up (by "test me") into

"test me for more tests to get the test results after having completed the test task next one:"
"test me for more tests to get the test results after having completed the test task and again:"
"test me for more tests to get the test results after having completed the test task"

does anyone of you know a good way how to do this?
so some kind of tokenizing like in C and C++ would be interesing. but is there something similar in C#? because in C and C++ you are able to divide strings by a token into substrings.

thanks.
stephan.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.