Browse Source

Lua : Changin helper name for LuaStringTools

It's already in the lua module, I'll just use lua.StringTools
Justin Donaldson 10 years ago
parent
commit
8e2ab39d78
2 changed files with 6 additions and 6 deletions
  1. 1 1
      std/lua/StringTools.hx
  2. 5 5
      std/lua/_std/String.hx

+ 1 - 1
std/lua/LuaStringTools.hx → std/lua/StringTools.hx

@@ -1,6 +1,6 @@
 package lua;
 package lua;
 @:native("_G.string") 
 @:native("_G.string") 
-extern class LuaStringTools {
+extern class StringTools {
 	public static function len(str:String) : Int;
 	public static function len(str:String) : Int;
 	public static function sub(str:String, start:Int, end:Int) : String;
 	public static function sub(str:String, start:Int, end:Int) : String;
 	public static function charCodeAt(str:String, index:Int) : Int;
 	public static function charCodeAt(str:String, index:Int) : Int;

+ 5 - 5
std/lua/_std/String.hx

@@ -32,7 +32,7 @@ extern class String {
 	inline function indexOf( str : String, ?startIndex : Int ) : Int {
 	inline function indexOf( str : String, ?startIndex : Int ) : Int {
 		if (startIndex == null) startIndex = 1;
 		if (startIndex == null) startIndex = 1;
 		else startIndex += 1;
 		else startIndex += 1;
-		return lua.LuaStringTools.find(this, str, startIndex, str.length, true);
+		return lua.StringTools.find(this, str, startIndex, str.length, true);
 	}
 	}
 	inline function lastIndexOf( str : String, ?startIndex : Int ) : Int {
 	inline function lastIndexOf( str : String, ?startIndex : Int ) : Int {
 		return 0;
 		return 0;
@@ -51,17 +51,17 @@ extern class String {
 	}
 	}
 
 
 	inline function get_length() : Int {
 	inline function get_length() : Int {
-		return lua.LuaStringTools.len(this);
+		return lua.StringTools.len(this);
 	}
 	}
 	inline function charAt( index : Int) : String {
 	inline function charAt( index : Int) : String {
-		return lua.LuaStringTools.sub(this,index+1, index+1);
+		return lua.StringTools.sub(this,index+1, index+1);
 	}
 	}
 	inline function charCodeAt( index : Int) : Null<Int> {
 	inline function charCodeAt( index : Int) : Null<Int> {
-		return lua.LuaStringTools.byte(this,index+1);
+		return lua.StringTools.byte(this,index+1);
 	}
 	}
 
 
 	inline function substr( pos : Int, ?len : Int ) : String {
 	inline function substr( pos : Int, ?len : Int ) : String {
-		return lua.LuaStringTools.substr(this, pos, len);
+		return lua.StringTools.substr(this, pos, len);
 	}
 	}
 
 
 	static function fromCharCode( code : Int ) : String;
 	static function fromCharCode( code : Int ) : String;