/// <summary> /// Original line-endings in the text are respected. /// </summary> /// <param name="text"> to wrap </param> /// <param name="lineLength"> no line will exceed this length </param> /// <returns> the text where no line exceeds the specified length </returns> //JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected: //ORIGINAL LINE: public static String wrapText(final String text, final int lineLength) public static string WrapText(string text, int lineLength) { IList <string> lines = Arrays.asList(text.Split("\r?\n", true)); //JAVA TO C# CONVERTER TODO TASK: Most Java stream collectors are not converted by Java to C# Converter: return(lines.Select(l => l.length() > lineLength ? WordUtils.wrap(l, lineLength) : l).collect(Collectors.joining(_newline))); }
public override string Usage() { return(WordUtils.wrap(string.Format("[--{0}[=<{1}>]]", NameConflict, ExampleValueConflict), 60)); }