[thelist] CF Question: Permutation of right(string, count)

Scott Dexter sgd at ti3.com
Mon Jan 8 17:59:26 CST 2001


there are a couple techniques I've done:

1) split the string into an array, using the comma as the delimiter, then
grab the last item in the array

2) strAfterComma = substring(InStr(",",strInput),Len(strInput))

3) strAfterComma = right(InStr(",",strInput),
Len(strInput)-InStr(",",strInput))

(not sure if InStr is a CF function, it returns the position of the comma,
check your documentation, some InStr-like functions return the first
occurence, some return the last)

make sense?
sgd
--
work: http://www.ti3.com/
non: http://thinksafely.org/

> -----Original Message-----
> From: Minh Lee Goon [mailto:v7ac at sdsumus.sdstate.edu]

> I would like to retrieve only the characters to the right of 
> a comma. I
> tried using the right(string, count) expression but the number of
> characters after the comma isn't always constant so I'm bound to get
> errors. For example, if my string is "foo,bar" I'd like to retrieve
> "bar" only.
> 




More information about the thelist mailing list