From bff34dd379389caf1c544034fd2f2f66108523bf Mon Sep 17 00:00:00 2001 From: pasky1382 Date: Mon, 20 Jan 2014 17:15:30 +0000 Subject: [PATCH] Cleanup. --- .../lua/EmuLuaLibrary.String.cs | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs index e37b896fa3..f3e8fcd722 100644 --- a/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs +++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs @@ -19,7 +19,7 @@ namespace BizHawk.Client.Common "startswith", "substring", "contains", - "remove", + "endswith", }; } @@ -38,49 +38,49 @@ namespace BizHawk.Client.Common return binary; } - public static string string_trim(object str) + public static string string_trim(string str) { - return Convert.ToString(str); + return str.Trim(); } - public static string string_replace(object str, object str2, object replace) + public static string string_replace(string str, string str2, string replace) { - return Convert.ToString(str).Replace(Convert.ToString(str2), Convert.ToString(replace)); + return str.Replace(str2,replace); } - public static string string_toupper(object str) + public static string string_toupper(string str) { - return Convert.ToString(str).ToUpper(); + return str.ToUpper(); } - public static string string_tolower(object str) + public static string string_tolower(string str) { - return Convert.ToString(str).ToLower(); + return str.ToLower(); } - public static string string_substring(object str, object position, object length) + public static string string_substring(string str, object position, object length) { - return Convert.ToString(str).Substring((int) position,(int) length); + return str.Substring((int) position,(int) length); } - public static string string_remove(object str, object position, object count) + public static string string_remove(string str, object position, object count) { - return Convert.ToString(str).Remove((int) position,(int) (count)); + return str.Remove((int) position,(int) (count)); } - public static bool string_contains(object str, object str2) + public static bool string_contains(string str, string str2) { - return Convert.ToString(str).Contains(Convert.ToString(str2)); + return str.Contains(str2); } - public static bool string_startswith(object str, object str2) + public static bool string_startswith(string str, string str2) { - return Convert.ToString(str).StartsWith(Convert.ToString(str2)); + return str.StartsWith(str2); } - public static bool string_endswith(object str, object str2) + public static bool string_endswith(string str, string str2) { - return Convert.ToString(str).EndsWith(Convert.ToString(str2)); + return str.EndsWith(str2); } } }