Browse Source

Add comment for indexOf

Pascal Peridont 19 years ago
parent
commit
a565ff74d7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      std/String.hx

+ 5 - 0
std/String.hx

@@ -52,6 +52,11 @@ extern class String {
 	function charAt( index : Int) : String;
 	function charCodeAt( index : Int) : Int;
 
+	/**
+		Returns the index of first occurence of [value]
+		If [value] is not found, will return -1
+		The optional [startIndex] parameter allows you to specify which character to start searching. The position returned is still relative to the beginning of the string.
+	**/
 	function indexOf( value : String, ?startIndex : Int ) : Int;
 	function lastIndexOf( value : String, startIndex : Int ) : Int;
 	function split( delimiter : String ) : Array<String>;