diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
index 8a70f917ff..e4302a372d 100644
--- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj
+++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
@@ -117,6 +117,7 @@
+
diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs
index c2b647cd04..96ccc88470 100644
--- a/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs
+++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Bit.cs
@@ -19,7 +19,6 @@ namespace BizHawk.Client.Common
"ror",
"rshift",
"check",
- "signed",
};
}
}
diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs
index 54796e82a2..0d60e9bca6 100644
--- a/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs
+++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.String.cs
@@ -12,6 +12,14 @@ namespace BizHawk.Client.Common
{
"hex",
"binary",
+ "trim",
+ "replace",
+ "toupper",
+ "tolower",
+ "startswith",
+ "substring",
+ "contains",
+ "endswith",
};
}
}
@@ -29,6 +37,50 @@ namespace BizHawk.Client.Common
return binary;
}
+ public static string string_trim(object str)
+ {
+ return Convert.ToString(str);
+ }
+
+ public static string string_replace(object str, object str2, object replace)
+ {
+ return Convert.ToString(str).Replace(Convert.ToString(str2), Convert.ToString(replace));
+ }
+
+ public static string string_toupper(object str)
+ {
+ return Convert.ToString(str).ToUpper();
+ }
+
+ public static string string_tolower(object str)
+ {
+ return Convert.ToString(str).ToLower();
+ }
+
+ public static string string_substring(object str, object position, object length)
+ {
+ return Convert.ToString(str).Substring((int) position,(int) length);
+ }
+
+ public static string string_remove(object str, object position, object count)
+ {
+ return Convert.ToString(str).Remove((int) position,(int) (count));
+ }
+
+ public static bool string_contains(object str, object str2)
+ {
+ return Convert.ToString(str).Contains(Convert.ToString(str2));
+ }
+
+ public static bool string_startswith(object str, object str2)
+ {
+ return Convert.ToString(str).StartsWith(Convert.ToString(str2));
+ }
+
+ public static bool string_endswith(object str, object str2)
+ {
+ return Convert.ToString(str).EndsWith(Convert.ToString(str2));
+ }
}
}
diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs
index 0c369bcdc1..8ce81e4b4b 100644
--- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs
+++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs
@@ -94,7 +94,7 @@ namespace BizHawk.Client.EmuHawk
new NESLuaLibrary().LuaRegister(lua, Docs);
new SavestateLuaLibrary().LuaRegister(lua, Docs);
new SNESLuaLibrary().LuaRegister(lua, Docs);
- //new StringLuaLibrary().LuaRegister(lua, Docs);
+ new StringLuaLibrary().LuaRegister(lua, Docs);
Docs.Sort();
}