// Trim the string (remove whitespaces etc, from the beginning and/or end) public ktString Trim(ktStripType St) { return Trim(St, "\n\t "); }
public ktString Strip(ktStripType St) { return Strip(St, new ktString("\n\t ")); }
// Trim the string (remove whitespaces etc, from the beginning and/or end) public ktString Trim(ktStripType St, ktString WS) { if ((St == ktStripType.both) || (St == ktStripType.leading)) { m_Content = m_Content.TrimStart(WS.GetValue().ToCharArray()); } if ((St == ktStripType.both) || (St == ktStripType.trailing)) { m_Content = m_Content.TrimEnd(WS.GetValue().ToCharArray()); } return this; }
public ktString Strip(ktStripType St, ktString Delim) { string Str = m_Content; if ((St == ktStripType.both) || (St == ktStripType.leading)) { Str = Str.TrimStart(Delim.GetValue().ToCharArray()); } if ((St == ktStripType.both) || (St == ktStripType.trailing)) { Str = Str.TrimEnd(Delim.GetValue().ToCharArray()); } return new ktString(Str); }