Example #1
0
 public bool IsEmptyOrWhiteSpace()
 {
     foreach (var word in Words)
     {
         if (!BrailleWord.IsBlank(word) && !BrailleWord.IsEmpty(word))
         {
             return(false);
         }
     }
     return(true);
 }
Example #2
0
        /// <summary>
        /// 去掉開頭的空白字元。
        /// </summary>
        public void TrimStart()
        {
            int i = 0;

            while (i < m_Words.Count)
            {
                if (BrailleWord.IsBlank(m_Words[i]) || BrailleWord.IsEmpty(m_Words[i]))
                {
                    m_Words.RemoveAt(i);
                    continue;
                }
                break;
            }
        }
Example #3
0
        /// <summary>
        /// 去掉結尾的空白字元。
        /// </summary>
        public void TrimEnd()
        {
            int i = m_Words.Count - 1;

            while (i >= 0)
            {
                if (BrailleWord.IsBlank(m_Words[i]) || BrailleWord.IsEmpty(m_Words[i]))
                {
                    m_Words.RemoveAt(i);
                    i--;
                    continue;
                }
                break;
            }
        }