String::compareTo() \ Language (API) \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

Reference for Wiring version 0024+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Class | String
Name | ### compareTo()
Examples |
    String str = String("CCCP");
    String str1 = String("CCCP");
    int p1 = str.compareTo(str1);
    Serial.println(p1, DEC); // Prints 0
Description | Compares two strings lexicographically based on the value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence represented by the argument string. The result is a negative integer if this String object lexicographically precedes the argument string. The result is a positive integer if this String object lexicographically follows the argument string. The result is zero if the strings are equal.
Syntax |
    compareTo(str)
Parameters |
str | String: the substring to compare with
Returns | int
Usage | Application

Updated on November 01, 2009 01:04:43pm PST