Easy way to strip a leading character from a string
Easy way to strip a leading character from a string
- Subject: Easy way to strip a leading character from a string
- From: Michelle Steiner <email@hidden>
- Date: Fri, 19 Dec 2003 16:21:36 -0700
It's elementary, so I apologize in advance if I'm insulting anyone's
intelligence with this.
-- Michelle
set foo to "00001234"
set strip_char to "0"
set foo to strip_leading_0(foo, strip_char)
to strip_leading_0(foo, strip)
repeat while first character of foo is strip
set foo to text 2 through end of foo
end repeat
end strip_leading_0
--
Homosexuals do not recruit; Christians recruit.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.