[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] The use of ltrim function



Because what appears to be a string is a set.

ltrim($x, 'bookkeeper')

and 

ltrim($x, 'bekpr')

accomplish the same.

In SQR, yes, you must use the instr, substr, length functions. But you
could always code up a procedure to encapsulate them.

>>> j-lee@groupwise.umn.edu 10/14/2004 10:58:27 AM >>>
Hi,

It is true that if one is to trim a character from the left of a
string, this function of let command works very well.    Why is it
that
if this function is used to trim a string of characters, the result is
unpredictable?

Here's the story:

Let $string_whole =
'/l99/dbexample/PRODUCTION/fa/aidyear2005/umncr/CRAA05IN'

let $string_ltrim = '/l99/dbexample/PRODUCTION/fa/aidyear2005/umncr/'

let $string_result = ltrim($string_whole, $string_ltrim)

In two different instances (or environments) where the same code is
executed, the content of $string_result varies:
Instance #1: 'CRAA05IN'
Instance #2: 'RAA05IN'

Does one always have to use a combination of instri, length, and
substr
to get a substring out of another string?  What are the ways folks use
often for this type of operation?

Thanks in advance,

Jennifer


This e-mail and its attachments have been scanned for viruses.
EAS - Systems Support, OIT, University of Minnesota


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users