예제 #1
0
        public bool DoSpell(string word)
        {
            nint wordCount = 0;
            var  res       = _nativeSpellChecker.CheckSpelling(word, 0, "en", true, 0, out wordCount);

            return(res.Location != 0);
        }
예제 #2
0
        public override string GetTypo(string txt)
        {
            var checkRange = new NSRange(0, txt.Length);
            var typoRange  = checker.CheckSpelling(txt, 0);

            if (typoRange.Length == 0)
            {
                return(String.Empty);
            }
            return(txt.Substring((int)typoRange.Location, (int)typoRange.Length));
        }
예제 #3
0
        public override string GetTypo(string txt)
        {
            var  checkRange = new NSRange(0, txt.Length);
            nint wordCount;
            var  typoRange = checker.CheckSpelling(txt, 0, "en_US", false, 0, out wordCount);

            if (typoRange.Length == 0)
            {
                return(String.Empty);
            }
            return(txt.Substring((int)typoRange.Location, (int)typoRange.Length));
        }