문제

Is there a function in Coldfusion that will take 2 strings and figure out which is the 'higher' alphabetically . So if I had "Daniel" and "John", it would return Daniel?

도움이 되었습니까?

해결책

Put your strings into an array then use arraySort(). (example not tested)

var names = ['Daniel', 'John'];
arraySort( names, 'textnocase' );
writeOutput(names[1]);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top