String::indexOf() \ Language (API) \ Processing 1.0
Search processing.org:
Language (A-Z) \
Libraries \
Tools \
Environment \
Compare \
Troubleshooting
Reference for Processing version 1.0+. 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
indexOf()
Examples
String str = "CCCP";
int p1 = str.indexOf("C");
int p2 = str.indexOf("P");
int p3 = str.indexOf("CP");
println(p1 + ":" + p2 + ":" + p3); // Prints '0:3:2'
Description
Tests to see if a substring is embedded in a string and returns the index position of the first occurance of the substring defined in the str parameter. If the str parameter is not found in the string, -1 is returned.
Syntax
str.indexOf(str)
str.indexOf(str, fromIndex)
Parameters
str
String: any variable of type String
str
String: the substring to search
fromIndex
int: the index from which to start the search
Returns
int
Usage
Web & Application
Updated on November 22, 2008 08:39:25pm PST
Processing was initiated by Ben Fry and Casey Reas. It is developed by a small team of volunteers.
© Info \
Site hosted by Media Temple!
Wyszukiwarka
Podobne podstrony:
String indexOfString indexOfString concatSTRING (3)stringappendoperatorVector indexOfindexoutlineStrings LWBString equalsStringSeqHolderstrings01String substringstrings SPfunction mysql real escape stringSTRINGSStringValueExpStringClasswięcej podobnych podstron