ListFind but only first instance of letter at START of item
I am familiar with several list functions in CF but I can't seem to figure out how to do this thing:
I have a long list (from a query in coldfusion) of names, e.g. "john" or "silverfox" or "7" (all "user aliases"). say, query.alias
I have to put this out on a page and it's way too many for sanity.
I want to break it up by the first letter of the name. Like:
*: (list from the point before names begin with letters, like numbers and special chars)
A: (list from the point where names begin with A)
B: (list from the point where names begin with B)
C: (list from the point where names begin with C)
But listfind just finds the first "a" (and none of are just 'a' as a name), and listcontains just finds the first name that contains an A anywhere.
How can I find the location in the list of where a value BEGINS WITH a certain string ("a"), so I can make a var of that value, and then loop the query out with a rowcount and 'start/stop' it at the appropriate places? (I guess that's how it would be done, seems logical.)
I would so appreciate any advice. I've been searching all day and haven't yet found this specific answer.
PS I want to add that I'm having serious shared-server timeout problems so I'm trying to minimize database calls, hence not wanting to loop 27 queries instead...
Best,
PJ
