#124405 - 2004-08-04 02:17 PM
Re: Remove first and last Character
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
This should not be too difficult.. Some String manipulation..
Code:
CLS BREAK ON ; PURPOSE - remove first and last char from a string $TestStr='AzzyTest' ;Starting with ?$TestStr ;Remove First Char $EndStr=RIGHT($TestStr,LEN($TestStr)-1) ;Check the Result ?$EndStr ;Remove the Last Char $StartStr=LEFT($EndStr,LEN($EndStr)-1) ;Check the Result ?$StartStr
Sleep 2
HTH,
Kent
|
|
Top
|
|
|
|
#124408 - 2004-08-04 02:44 PM
Re: Remove first and last Character
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Or even (in this case only): Code:
$s='"This is a quoted string"' $s=Split($s,Left($s,1))[1] $s ?
|
|
Top
|
|
|
|
#124411 - 2004-08-04 03:01 PM
Re: Remove first and last Character
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
did not say my method was bullet proof. But, just to show it can be done.
Kent
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Henriques)
and 2516 anonymous users online.
|
|
|