浏览代码

removed @:coreApi documentation that is not in sync with the crossplatform one

Nicolas Cannasse 12 年之前
父节点
当前提交
0235af841a
共有 3 个文件被更改,包括 1 次插入135 次删除
  1. 0 48
      std/cs/_std/String.hx
  2. 0 39
      std/java/_std/EReg.hx
  3. 1 48
      std/java/_std/String.hx

+ 0 - 48
std/cs/_std/String.hx

@@ -21,80 +21,32 @@
  */
 import cs.StdTypes;
 
-/**
-	The basic String class.
-**/
 @:coreType extern class String implements ArrayAccess<Char16> {
 
 	private static function Compare(s1:String, s2:String):Int;
 
-	/**
-		The number of characters in the String.
-	**/
 	var length(default,null) : Int;
 
-	/**
-		Creates a copy from a given String.
-	**/
 	function new(string:String) : Void;
 
-	/**
-		Returns an String where all characters have been uppercased.
-	**/
 	function toUpperCase() : String;
 
-	/**
-		Returns an String where all characters have been lowercased.
-	**/
 	function toLowerCase() : String;
 
-	/**
-		Returns the character at the given position.
-		Returns the empty String if outside of String bounds.
-	**/
 	function charAt( index : Int) : String;
 
-	/**
-		Returns the character code at the given position.
-		Returns [null] if outside of String bounds.
-	**/
 	function charCodeAt( index : Int) : Null<Int>;
 
-	/**
-		Returns the index of first occurence of [value]
-		Returns [1-1] if [value] is not found.
-		The optional [startIndex] parameter allows you to specify at which character to start searching.
-		The position returned is still relative to the beginning of the string.
-	**/
 	function indexOf( str : String, ?startIndex : Int ) : Int;
 
-	/**
-		Similar to [indexOf] but returns the latest index.
-	**/
 	function lastIndexOf( str : String, ?startIndex : Int ) : Int;
 
-	/**
-		Split the string using the specified delimiter.
-	**/
 	function split( delimiter : String ) : Array<String>;
 
-	/**
-		Returns a part of the String, taking [len] characters starting from [pos].
-		If [len] is not specified, it takes all the remaining characters.
-	**/
 	function substr( pos : Int, ?len : Int ) : String;
 
-	/**
-		Returns a part of the String, taking from [startIndex] to [endIndex] - 1.
-		If [endIndex] is not specified, length is used.
-		If [startIndex] or [endIndex] is smaller than 0, than 0 is used.
-		If [startIndex] > [endIndex] then they are swaped.
-	**/
 	function substring( startIndex : Int, ?endIndex : Int ) : String;
 
-	/**
-		Returns the String itself.
-	**/
 	function toString() : String;
 
 	static function fromCharCode( code : Int ) : String;

+ 0 - 39
std/java/_std/EReg.hx

@@ -45,11 +45,6 @@ import java.util.regex.Regex;
  * DAMAGE.
  */
 
-/**
-	Regular expressions are a way to find regular patterns into
-	Strings. Have a look at the tutorial on haXe website to learn
-	how to use them.
-**/
 @:coreType class EReg {
 
 	private var pattern:String;
@@ -58,10 +53,6 @@ import java.util.regex.Regex;
 	private var sub:Int;
 	private var isGlobal:Bool;
 
-	/**
-		Creates a new regular expression with pattern [r] and
-		options [opt].
-	**/
 	public function new( r : String, opt : String ) {
 		var flags = 0;
 		for (i in 0...opt.length)
@@ -111,10 +102,6 @@ import java.util.regex.Regex;
 		return r;
 	}
 
-	/**
-		Tells if the regular expression matches the String.
-		Updates the internal state accordingly.
-	**/
 	public function match( s : String ) : Bool {
 		sub = 0;
 		cur = s;
@@ -122,11 +109,6 @@ import java.util.regex.Regex;
 		return matcher.find();
 	}
 
-	/**
-		Returns a matched group or throw an expection if there
-		is no such group. If [n = 0], the whole matched substring
-		is returned.
-	**/
 	public function matched( n : Int ) : String
 	{
 		if (n == 0)
@@ -135,28 +117,16 @@ import java.util.regex.Regex;
 			return matcher.group(n);
 	}
 
-	/**
-		Returns the part of the string that was as the left of
-		of the matched substring.
-	**/
 	public function matchedLeft() : String
 	{
 		return untyped cur.substring(0, sub + matcher.start());
 	}
 
-	/**
-		Returns the part of the string that was at the right of
-		of the matched substring.
-	**/
 	public function matchedRight() : String
 	{
 		return untyped cur.substring(sub + matcher.end(), cur.length);
 	}
 
-	/**
-		Returns the position of the matched substring within the
-		original matched string.
-	**/
 	public function matchedPos() : { pos : Int, len : Int } {
 		var start = matcher.start();
 		return { pos : sub + start, len : matcher.end() - start };
@@ -170,10 +140,6 @@ import java.util.regex.Regex;
 		return matcher.find();
 	}
 
-	/**
-		Split a string by using the regular expression to match
-		the separators.
-	**/
 	public function split( s : String ) : Array<String>
 	{
 		if (isGlobal)
@@ -261,11 +227,6 @@ import java.util.regex.Regex;
       return b.toString();
 	}
 
-	/**
-		For each occurence of the pattern in the string [s], the function [f] is called and
-		can return the string that needs to be replaced. All occurences are matched anyway,
-		and setting the [g] flag might cause some incorrect behavior on some platforms.
-	**/
 	public function map( s : String, f : EReg -> String ) : String {
 		var offset = 0;
 		var buf = new StringBuf();

+ 1 - 48
std/java/_std/String.hx

@@ -19,80 +19,33 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-/**
-	The basic String class.
-**/
+
 extern class String {
 
-	/**
-		The number of characters in the String.
-	**/
 	var length(default,null) : Int;
 
-	/**
-		Creates a copy from a given String.
-	**/
 	@:overload(function(b:haxe.io.BytesData, offset:Int, length:Int, charsetName:String):Void { })
 	@:overload(function(b:haxe.io.BytesData, offset:Int, length:Int):Void { })
 	function new(string:String) : Void;
 
-	/**
-		Returns an String where all characters have been uppercased.
-	**/
 	function toUpperCase() : String;
 
-	/**
-		Returns an String where all characters have been lowercased.
-	**/
 	function toLowerCase() : String;
 
-	/**
-		Returns the character at the given position.
-		Returns the empty String if outside of String bounds.
-	**/
 	function charAt( index : Int) : String;
 
-	/**
-		Returns the character code at the given position.
-		Returns [null] if outside of String bounds.
-	**/
 	function charCodeAt( index : Int) : Null<Int>;
 
-	/**
-		Returns the index of first occurence of [value]
-		Returns [1-1] if [value] is not found.
-		The optional [startIndex] parameter allows you to specify at which character to start searching.
-		The position returned is still relative to the beginning of the string.
-	**/
 	function indexOf( str : String, ?startIndex : Int ) : Int;
 
-	/**
-		Similar to [indexOf] but returns the latest index.
-	**/
 	function lastIndexOf( str : String, ?startIndex : Int ) : Int;
 
-	/**
-		Split the string using the specified delimiter.
-	**/
 	function split( delimiter : String ) : Array<String>;
 
-	/**
-		Returns a part of the String, taking [len] characters starting from [pos].
-		If [len] is not specified, it takes all the remaining characters.
-	**/
 	function substr( pos : Int, ?len : Int ) : String;
 	
-	/**
-		Returns a part of the String, taking from [startIndex] to [endIndex] - 1.
-		If [endIndex] is not specified, length is used.
-		If [startIndex] or [endIndex] is smaller than 0, than 0 is used.
-		If [startIndex] > [endIndex] then they are swaped.
-	**/
 	function substring( startIndex : Int, ?endIndex : Int ) : String;
 
-	/**
-		Returns the String itself.
-	**/
 	function toString() : String;
 	
 	private function compareTo( anotherString : String ) : Int;