public void Decamelize() { Assert.That(Humanizer.Decamelize("FooBar"), Is.EqualTo("foo-bar")); Assert.That(Humanizer.Decamelize("fooBar"), Is.EqualTo("foo-bar")); }
// -- Static methods --------------------------------------------------------------------- public static void PreInitialize( ) { foreach (EName name in System.Enum.GetValues(typeof(EName))) { var namestring = name.ToString( ); if ((int)name >= (int)EName.SchemeNames) { namestring = Humanizer.Decamelize(namestring); } var nameindex = (int)name; int hashIndex = GetStrigHash(name.ToString( )) & HashTableIndexMask; Names.Add(new NameEntry(namestring, NamesHash[hashIndex])); NamesHash[hashIndex] = nameindex; MemorySizeForNames += namestring.Length; } Initialized = true; }