text: public virtual int Lookup(char[] text, int offset, int len){if (!characterDefinition.IsGroup(text[offset])){return 1;}byte characterIdOfFirstCharacter = characterDefinition.GetCharacterClass(text[offset]);int length = 1;for (int i = 1; i < len; i++){if (characterIdOfFirstCharacter == characterDefinition.GetCharacterClass(text[offset + i])){length++;}else{break;}}return length;}