Click here to Skip to main content
15,890,973 members
Home / Discussions / C#
   

C#

 
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.
GeneralRe: splitting long string into parts Pin
Mike Marynowski18-Mar-08 0:48
professionalMike Marynowski18-Mar-08 0:48 
GeneralRe: splitting long string into parts Pin
Mike Marynowski18-Mar-08 0:56
professionalMike Marynowski18-Mar-08 0:56 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult18-Mar-08 5:47
mvePIEBALDconsult18-Mar-08 5:47 
GeneralRe: splitting long string into parts Pin
Mike Marynowski18-Mar-08 11:28
professionalMike Marynowski18-Mar-08 11:28 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult18-Mar-08 14:55
mvePIEBALDconsult18-Mar-08 14:55 
GeneralRe: splitting long string into parts Pin
Mike Marynowski19-Mar-08 7:31
professionalMike Marynowski19-Mar-08 7:31 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult19-Mar-08 7:58
mvePIEBALDconsult19-Mar-08 7:58 
GeneralRe: splitting long string into parts Pin
Chetan Patel18-Mar-08 1:00
Chetan Patel18-Mar-08 1:00 
GeneralRe: splitting long string into parts Pin
Christian Graus18-Mar-08 1:12
protectorChristian Graus18-Mar-08 1:12 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult18-Mar-08 5:55
mvePIEBALDconsult18-Mar-08 5:55 
Generalcontrol focusing problem Pin
Mike Marynowski18-Mar-08 0:24
professionalMike Marynowski18-Mar-08 0:24 
Questioncan service open a C# application Pin
Knowledgestudent18-Mar-08 0:18
Knowledgestudent18-Mar-08 0:18 
GeneralRe: can service open a C# application Pin
Mike Marynowski18-Mar-08 0:30
professionalMike Marynowski18-Mar-08 0:30 
AnswerRe: can service open a C# application Pin
EvilInside18-Mar-08 2:04
EvilInside18-Mar-08 2:04 
GeneralRe: can service open a C# application Pin
PIEBALDconsult18-Mar-08 5:59
mvePIEBALDconsult18-Mar-08 5:59 
QuestionRe: can service open a C# application Pin
Knowledgestudent18-Mar-08 21:34
Knowledgestudent18-Mar-08 21:34 
GeneralRe: can service open a C# application Pin
Mike Marynowski19-Mar-08 7:43
professionalMike Marynowski19-Mar-08 7:43 

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.