/// <summary> /// Wraps the passed string at the total /// number of characters (if cuttOff is true) /// or at the next whitespace (if cutOff is false). /// Uses the environment new line /// symbol for the break text. /// </summary> /// <param name="input">The string to wrap.</param> /// <param name="charCount">The number of characters /// per line.</param> /// <param name="cutOff">If true, will break in /// the middle of a word.</param> /// <returns>A string.</returns> public static string WordWrap(string input, int charCount, bool cutOff) { return(StrHelper.WordWrap(input, charCount, cutOff, Environment.NewLine)); }
/// <summary> /// Wraps the passed string at the /// at the next whitespace on or after the /// total charCount has been reached /// for that line. Uses the environment new line /// symbol for the break text. /// </summary> /// <param name="input">The string to wrap.</param> /// <param name="charCount">The number of characters /// per line.</param> /// <returns>A string.</returns> public static string WordWrap(string input, int charCount) { return(StrHelper.WordWrap(input, charCount, false, Environment.NewLine)); }