How to alphabetically compare two strings in Actionscript 3

I used strcmp(x,y) in C++. Do you know how to do that in as3?

Thanks!

Answers


You can use the normal operands != !== == < > <= =>


If it's a simple string compare you're after, don't bother writing one yourself.

var result:int = ObjectUtil.compare("stringA","stringB");

That achieves what you're looking for.


Need Your Help

C++:Use user-defined generic functions

c++ generics stl iterator generic-programming

I am now reading 《C++ Standard Library》.And I find something confused in chapter 5.7.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.