浏览代码

Add comment for indexOf

Pascal Peridont 19 年之前
父节点
当前提交
a565ff74d7
共有 1 个文件被更改,包括 5 次插入0 次删除
  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>;