WordWrap() public static méthode

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.
public static WordWrap ( string input, int charCount ) : string
input string The string to wrap.
charCount int The number of characters /// per line.
Résultat string
Exemple #1
0
 /// <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(StringUtil.WordWrap(input, charCount, cutOff, Environment.NewLine));
 }
Exemple #2
0
 /// <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(StringUtil.WordWrap(input, charCount, false, Environment.NewLine));
 }