Explorar o código

Add comment for indexOf

Pascal Peridont %!s(int64=19) %!d(string=hai) anos
pai
achega
a565ff74d7
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      std/String.hx

+ 5 - 0
std/String.hx

@@ -52,6 +52,11 @@ extern class String {
 	function charAt( index : Int) : String;
 	function charAt( index : Int) : String;
 	function charCodeAt( index : Int) : Int;
 	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 indexOf( value : String, ?startIndex : Int ) : Int;
 	function lastIndexOf( value : String, startIndex : Int ) : Int;
 	function lastIndexOf( value : String, startIndex : Int ) : Int;
 	function split( delimiter : String ) : Array<String>;
 	function split( delimiter : String ) : Array<String>;