Sunday, March 12, 2006

Re: st: how to avoid truncation when trimming a long string

At 06:38 PM 3/12/2006, reardon, sean f. wrote: >colleagues -- >i want to trim leading a trailing blanks off a string entered by a user >in a program -- the string is saved in local macro "model". the string >may be very long (longer than 256 characters). > >when i use the following line: > >local model = trim("`model'")

How about just

local model `model'

I believe leading and trailing blanks get striped that way.

------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 FAX: (574)288-4373 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW (personal): WWW (department):

* * For searches and help try: * * *


Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?