Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Is there a function to remove leading white space?
Is there a function to remove leading white space? [message #2738] Sun, 23 April 2006 16:01 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
I have a string and I want to remove all white spaces at its beginning.
I believed .Shrink() could be useful to do it but doesn't seem so. I played even with Filter and FilterWhile with no success. Of course I can prepare my own function but maybe there is already... and well hided.

Luigi

Re: Is there a function to remove leading white space? [message #2739 is a reply to message #2738] Sun, 23 April 2006 16:03 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Sun, 23 April 2006 16:01

I have a string and I want to remove all white spaces at its beginning.
I believed .Shrink() could be useful to do it but doesn't seem so. I played even with Filter and FilterWhile with no success. Of course I can prepare my own function but maybe there is already... and well hided.

Luigi



No Prob... I found it. It is :

String TrimLeft(const String& str)

If you need something useful it is certanly in U++ but sometimes it escapes from your eyes.

[Updated on: Sun, 23 April 2006 16:12]

Report message to a moderator

Re: Is there a function to remove leading white space? [message #2740 is a reply to message #2738] Sun, 23 April 2006 20:13 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Sun, 23 April 2006 10:01

I have a string and I want to remove all white spaces at its beginning.
I believed .Shrink() could be useful to do it but doesn't seem so. I played even with Filter and FilterWhile with no success. Of course I can prepare my own function but maybe there is already... and well hided.

Luigi





Shrink method, in general, serves to minimize the memory ocupied by object (many objects allocate more memory than is needed to store the data due to speed reasons - shrink releases this overhead).

Filters are intended to approve-reject-transform individual chatacters of string.

Mirek
Previous Topic: conversion between data of a cell of the arrayctrl to int
Next Topic: Is there a token function?
Goto Forum:
  


Current Time: Sun May 05 03:40:21 CEST 2024

Total time taken to generate the page: 0.02647 seconds