Sign in to follow this  
Followers 0
latoonne

Blank Characters

5 posts in this topic

hello everybody,

exist there a same function as Trim() in Visual basic

Thank's

Share this post


Link to post
Share on other sites



StringStripWS

--------------------------------------------------------------------------------

Strips the white space in a string.

StringStripWS ( "string", flag )

Parameters

string The string to strip.

flag Flag to indicate the type of stripping that should be performed (add the flags together for multiple operations):

1 = strip leading white space

2 = strip trailing white space

4 = strip double (or more) spaces between words

8 = strip all spaces (over-rides all other flags)

Return Value

Returns the new string stripped of the requested white space.

Remarks

Whitespace includes Chr(9) thru Chr(13) which are HorizontalTab, LineFeed, VerticalTab, FormFeed, and CarriageReturn. Whitespace also includes the null string ( Chr(0) ) and the standard space ( Chr(32) ).

To strip single spaces between words, use the function StringReplace.

"string" parameter cannot be a binaryString.

StringTrimLeft

--------------------------------------------------------------------------------

Trims a number of characters from the left hand side of a string.

StringTrimLeft ( "string", count )

Parameters

string The string to evaluate.

count The number of characters to trim.

Return Value

Returns the string trimmed by count characters from the left.

Remarks

If count is out-of-bounds, an empty string is returned.

StringTrimLeft($str, $n) is functionally equivalent to StringRight($str, StringLen($str) - $n)

StringTrimRight

--------------------------------------------------------------------------------

Trims a number of characters from the right hand side of a string.

StringTrimRight ( "string", count )

Parameters

string The string to evaluate.

count The number of characters to trim.

Return Value

Returns the string trimmed by count characters from the right.

Remarks

If count is out-of-bounds, an empty string is returned.

StringTrimRight($str, $n) is functionally equivalent to StringLeft($str, StringLen($str) - $n)


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

@SmOke_N,

Was this what you were going for?

http://www.autoitscript.com/forum/index.ph...58entry157758

Just jokin'

:) Ha... I don't think that thread was a stab at me personally (More at the guy that DIDN'T read the help file) It feels like I read it everyday :mellow: Matter of fact, there are 3 things you can always count on being open on my desktop. 1. Firefox 2. SciTe 3. AutoIt Beta Help File :)

But.... Geesh... do you have a memory!!


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

...But.... Geesh... do you have a memory!!

A highly selective one according to my wife.

...and yeah, no real stab at you and not really at the OP either... it is a big (but excellent) help file. A help file search for the term "trim" would not always lead one to StringStripWS... good post.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0