Click here to Skip to main content
15,890,282 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: std::string Pin
Christian Graus21-Jul-05 18:56
protectorChristian Graus21-Jul-05 18:56 
GeneralRe: std::string Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX21-Jul-05 23:46
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX21-Jul-05 23:46 
GeneralRe: std::string Pin
Christian Graus22-Jul-05 11:52
protectorChristian Graus22-Jul-05 11:52 
GeneralRegular Expressions Pin
Kevin McFarlane23-Jul-05 1:17
Kevin McFarlane23-Jul-05 1:17 
GeneralRe: Regular Expressions Pin
Christian Graus23-Jul-05 2:46
protectorChristian Graus23-Jul-05 2:46 
GeneralRe: Regular Expressions Pin
Kevin McFarlane23-Jul-05 3:43
Kevin McFarlane23-Jul-05 3:43 
GeneralRe: Regular Expressions Pin
Christian Graus23-Jul-05 10:58
protectorChristian Graus23-Jul-05 10:58 
GeneralRe: std::string - HELP Pin
LCI25-Jul-05 4:35
LCI25-Jul-05 4:35 
Great.. thanks for all your input.
I also wrote a small method that will strip all the spaces from the end of an basic_string up until is reaches text.
So a string like "This is a test " .. would be
"This is a test" once the method is complete.

Something is not working correctly though.

typedef std::string::size_type size_type;
std::string AnyString;
char MySpace = ' ';
size_type CHAR_INDEX;

CHAR_INDEX = AnyString.size();//AnyString.rfind(MySpace);

for (size_type i = CHAR_INDEX;AnyString[i]== MySpace; i--)
AnyString.erase(i,1);

The above source only works when stripping one space, like from
"2003 " to "2003".

If i have "2003 ", it does not work. Can anyone tell me what i am doing wrong here?
GeneralRe: std::string - HELP Pin
Roland Pibinger25-Jul-05 13:08
Roland Pibinger25-Jul-05 13:08 
GeneralRe: std::string - HELP Pin
Rob Caldecott26-Jul-05 21:08
Rob Caldecott26-Jul-05 21:08 
GeneralRe: std::string - HELP Pin
Kevin McFarlane30-Jul-05 23:38
Kevin McFarlane30-Jul-05 23:38 
GeneralRe: std::string - HELP Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX31-Jul-05 23:46
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX31-Jul-05 23:46 
GeneralRe: std::string - HELP Pin
Kevin McFarlane1-Aug-05 7:21
Kevin McFarlane1-Aug-05 7:21 
GeneralRe: std::string - HELP Pin
Nemanja Trifunovic1-Aug-05 8:12
Nemanja Trifunovic1-Aug-05 8:12 
GeneralRe: std::string - HELP Pin
Kevin McFarlane1-Aug-05 23:04
Kevin McFarlane1-Aug-05 23:04 
GeneralRe: std::string - HELP Pin
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX2-Aug-05 2:19
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX2-Aug-05 2:19 
GeneralRe: std::string Pin
Igor Vigdorchik25-Jul-05 9:27
Igor Vigdorchik25-Jul-05 9:27 
Generalusing auto_ptr Pin
kramkrish21-Jul-05 1:17
kramkrish21-Jul-05 1:17 
GeneralRe: using auto_ptr Pin
Nish Nishant21-Jul-05 1:41
sitebuilderNish Nishant21-Jul-05 1:41 
GeneralRe: using auto_ptr Pin
Nish Nishant21-Jul-05 1:43
sitebuilderNish Nishant21-Jul-05 1:43 
GeneralRe: using auto_ptr Pin
kramkrish22-Jul-05 3:46
kramkrish22-Jul-05 3:46 
GeneralRe: using auto_ptr Pin
Jörgen Sigvardsson23-Jul-05 3:21
Jörgen Sigvardsson23-Jul-05 3:21 
GeneralRe: using auto_ptr Pin
Nish Nishant23-Jul-05 4:31
sitebuilderNish Nishant23-Jul-05 4:31 
GeneralBUG: ATL 7.0 fails if chunk size is 07ff (2047 bytes) Pin
arun140520-Jul-05 4:54
arun140520-Jul-05 4:54 
GeneralImporting foreign types in IDL File Pin
morenz19-Jul-05 6:49
morenz19-Jul-05 6:49 

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.