This commit is contained in:
pasky1382 2014-01-20 17:15:30 +00:00
parent 90d8aedbd5
commit bff34dd379
1 changed files with 19 additions and 19 deletions

View File

@ -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);
}
}
}