|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| Hi. I've got a little not so elegant script to trim spaces from the beginning of a line. It handles if the whole line is full of spaces, but I was wondering if anyone out there has anything faster and is willing to share. TIA, Alex Zavatone Here's mine: on TrimSpacesFromStartOfLine(myText) set myLength to the length of myText set myChar to character 1 of myText repeat while (myChar = " ") if myLength > 1 then set myText to characters 2 through myLength of myText as string set myLength to the length of myText set myChar to character 1 of myText else set myText to "" set myChar to "" end if end repeat return myText end TrimSpacesFromStartOfLine This email message and any attachments are for the sole use of the intended recipient(s) and may contain information that is proprietary to U.S. Foodservice, Inc and/or its subsidiaries or otherwise confidential or legally privileged. If you have received this message in error, please notify the sender by reply, and delete all copies of this message and any attachments. If you are the intended recipient you may use the information contained in this message and any files attached to this message only as authorized by U.S. Foodservice. Files attached to this message may only be transmitted using secure systems and appropriate means of encryption, and must be secured using the same level password and security protection with which the file was provided to you. Any unauthorized use, dissemination or disclosure of this message or it's attachments is strictly prohibited. |
_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.