Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
File open/save dialog
Check for Network Xtras
Movie Slider Control
Check user's administrative privileges on NT platform
TAGGuard
Import Save File From Command Line
Xtra Checker
XAdKey xtra
Stop MPEG with MCI commands
Get Visual Line Count and Current Visual Line of Insertion
MediaMacros Xtras Mall
 

 

 

Behavior Triming spaces from string

Added on 6/5/2002

 

Compatibilities:
D7 D8 D8_5 Mac PC Script

This item has not yet been rated

Author: tramsMM

Use this code to trim the spaces present in a string either at the end of the string or at the beginning of the string

-- Use this code to trim the spaces present in a string either at the end of the string
--  or at the beginning of the string

on Ltrim Str
  
  --trims the spaces from the left of the string
  
  repeat while chars(Str,1,1)=" "
    
    set Str=chars(Str,2,length(Str))
    
  end repeat
  
  return Str
  
end
on Rtrim Str
    --trims the spaces from the right of the string
  set i=length(Str)
  
  repeat While chars(Str,i,i)=" "
    set Str=chars(Str,1,i-1)
    set i=length(Str)
  end repeat
  
  return Str
  
end

on TrimBoth Str
  
  Set Str=Ltrim(Str)
  set  Str=Rtrim(Str)
  return Str
  
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail