Browse Source

Lua : lua.StringTools - added gsub extern and reformated things.

Justin Donaldson 10 years ago
parent
commit
824a60343e
1 changed files with 10 additions and 5 deletions
  1. 10 5
      std/lua/StringTools.hx

+ 10 - 5
std/lua/StringTools.hx

@@ -5,11 +5,16 @@ package lua;
  **/
 @:native("_G.string") 
 extern class StringTools {
-	public static function len(str:String) : Int;
-	public static function sub(str:String, start:Int, end:Int) : String;
-	public static function charCodeAt(str:String, index:Int) : Int;
-	public static function find(str:String, target:String, start:Int, end :Int, plain:Bool) : Int;
-	public static function byte(str:String, index:Int) : Int;
+	public static function len(str : String): Int;
+	public static function sub(str : String, start : Int, end : Int): String;
+	public static function charCodeAt(str : String, index : Int): Int;
+	public static function find(str : String, target : String, start : Int, end : Int, plain : Bool): Int;
+	public static function byte(str : String, ?index : Int) : Int;
+	public static function format(str : String, ?e1 : String, ?e2 : String, ?e3 : String, ?e4 : String): String;
+
+	@:overload(   function     (str : String, pattern : String, replace : String->String, ?n : Int): String {})
+	public static function gsub(str : String, pattern : String, replace : String,		  ?n : Int): String;
+
 
 	@:overload(function(pos:Int):String{})
 	//TODO: The rest