check out this awesome extension method

This commit is contained in:
zeromus 2011-06-13 05:39:01 +00:00
parent 1b16d640bf
commit 38a11e91fb
1 changed files with 5 additions and 0 deletions

View File

@ -88,6 +88,11 @@ namespace BizHawk
return true;
}
public static bool Bit(this byte b, int index)
{
return (b & (1 << index)) != 0;
}
public static string GetPrecedingString(this string str, string value)
{
int index = str.IndexOf(value);