コード例 #1
0
 internal static string InputToString(int inputMode, IntsRef term, bool isValidUnicode)
 {
     if (!isValidUnicode)
     {
         return(term.ToString());
     }
     else if (inputMode == 0)
     {
         // utf8
         return(ToBytesRef(term).Utf8ToString() + " " + term);
     }
     else
     {
         // utf32
         return(UnicodeUtil.NewString(term.Ints, term.Offset, term.Length) + " " + term);
     }
 }