Click here to Skip to main content
15,919,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple Monitor Software Pin
lizim31-Jan-05 20:48
lizim31-Jan-05 20:48 
GeneralRe: Multiple Monitor Software Pin
mav.northwind31-Jan-05 8:27
mav.northwind31-Jan-05 8:27 
Generaladding rows dynamically to a datagrid Pin
steve_rm31-Jan-05 4:19
steve_rm31-Jan-05 4:19 
GeneralRe: adding rows dynamically to a datagrid Pin
Anonymous31-Jan-05 5:22
Anonymous31-Jan-05 5:22 
QuestionRemove multiple blanks in a string? Pin
Syntaxo31-Jan-05 1:00
Syntaxo31-Jan-05 1:00 
AnswerRe: Remove multiple blanks in a string? Pin
lainoo31-Jan-05 1:58
lainoo31-Jan-05 1:58 
GeneralRe: Remove multiple blanks in a string? Pin
Syntaxo31-Jan-05 2:36
Syntaxo31-Jan-05 2:36 
GeneralRe: Remove multiple blanks in a string? Pin
mav.northwind31-Jan-05 2:49
mav.northwind31-Jan-05 2:49 
GeneralRe: Remove multiple blanks in a string? Pin
Syntaxo31-Jan-05 3:07
Syntaxo31-Jan-05 3:07 
GeneralRe: Remove multiple blanks in a string? Pin
mav.northwind31-Jan-05 5:07
mav.northwind31-Jan-05 5:07 
GeneralRe: Remove multiple blanks in a string? Pin
Syntaxo31-Jan-05 5:27
Syntaxo31-Jan-05 5:27 
GeneralRe: Remove multiple blanks in a string? Pin
mav.northwind31-Jan-05 6:15
mav.northwind31-Jan-05 6:15 
AnswerRe: Remove multiple blanks in a string? Pin
Corinna John31-Jan-05 2:51
Corinna John31-Jan-05 2:51 
//split string
String[] parts = strIn.split(' ');

//re-build string
StringBuilder newString = new StringBuilder();
for(int n=0; n<parts.Length; n++){
  if(parts[n].Length > 0){
     newString.Append(parts[n]);
     newString.Append(" ");
  }
}

//remove trailing space and return
newString.Remove(newString.Length-1, 1);
return newString.ToString();


_________________________________
Vote '1' if you're too lazy for a discussion

GeneralRe: Remove multiple blanks in a string? Pin
Syntaxo31-Jan-05 3:42
Syntaxo31-Jan-05 3:42 
AnswerRe: Remove multiple blanks in a string? Pin
leppie31-Jan-05 7:32
leppie31-Jan-05 7:32 
Generalconnect to mySQL Pin
Jassim Rahma31-Jan-05 0:57
Jassim Rahma31-Jan-05 0:57 
GeneralRe: connect to mySQL Pin
Colin Angus Mackay31-Jan-05 5:16
Colin Angus Mackay31-Jan-05 5:16 
GeneralDisplaying Interactive Diagrams Pin
Mridang Agarwalla31-Jan-05 0:14
Mridang Agarwalla31-Jan-05 0:14 
GeneralRe: Displaying Interactive Diagrams Pin
DavieB31-Jan-05 4:50
DavieB31-Jan-05 4:50 
GeneralRe: Displaying Interactive Diagrams Pin
Steve Maier31-Jan-05 10:43
professionalSteve Maier31-Jan-05 10:43 
GeneralRe: Displaying Interactive Diagrams Pin
Mridang Agarwalla1-Feb-05 19:55
Mridang Agarwalla1-Feb-05 19:55 
GeneralRe: Displaying Interactive Diagrams Pin
Steve Maier2-Feb-05 4:39
professionalSteve Maier2-Feb-05 4:39 
GeneralSQL transactions commit and rollback Pin
ppp00130-Jan-05 21:52
ppp00130-Jan-05 21:52 
GeneralRe: SQL transactions commit and rollback Pin
lainoo31-Jan-05 2:18
lainoo31-Jan-05 2:18 
GeneralRe: SQL transactions commit and rollback Pin
DavieB31-Jan-05 4:44
DavieB31-Jan-05 4:44 

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.