Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on alphabetizing

Status
Not open for further replies.

acl03

MIS
Jun 13, 2005
1,077
US
How would this list be alphabetized:

enviro testing
envirosafe inspections and consulting
enviro-tech services, inc

I am unsure how a hyphen affects positioning in an alphabetical list.

Thanks!

Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
ASCII alphabetising would put the hyphenated variant at the end and the {space} separated variant at the start.

If I were creating a list with those variants, I would prefer to see the hyphen and space ignored and sort purely on the alphabetical characters.

It is time for pacifists to stand up and fight for their beliefs.
 
They sort in Excel exactly the way you have them listed.
 
Interesting question.
I pulled to sort() example from the PHP manaual and using a modifier of SORT_REGULAR (which is the default) I got
enviro testing
enviro-tech services, inc
envirosafe inspections and consulting
with a modifier of SORT_NUMERIC I got
enviro-tech services, inc
envirosafe inspections and consulting
enviro testing
with a modifier of SORT_STRING and SORT_LOCALE_STRING I got the same result as SORT_REGULAR
Probabby of no use to you but I was bored for a few minutes !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top