User Tools

Site Tools


en:examples:objects:comparing_strings

Comparing Strings

Code

if (orxString_Compare("String One", "String Two") == 0) {
  // is the same			
} else {
  // is not the same
}
 
int value = orxString_Compare("aa", "ab"); //value is -1 (smaller)
 
int value2 = orxString_Compare("ab", "aa"); //value2 is 1 (larger)

More Information

For more details on string comparison, see the API entry.

en/examples/objects/comparing_strings.txt · Last modified: 2018/02/14 00:47 (6 years ago) by 127.0.0.1