C# Class QUT.Gplex.Parser.StringUtilities

显示文件 Open project: spark-shading-language/spark Class Usage Examples

Public Methods

Method Description
MakeComment ( int indent, string text ) : string

Modifies a string so that if it contains multiple lines every line after the first is prepended by "//" followed by "indent" spaces.

MaxWidth ( string source ) : int

Returns the character width of a (possibly multiline) string.

Method Details

MakeComment() public static method

Modifies a string so that if it contains multiple lines every line after the first is prepended by "//" followed by "indent" spaces.
public static MakeComment ( int indent, string text ) : string
indent int The line indent
text string The input string
return string

MaxWidth() public static method

Returns the character width of a (possibly multiline) string.
public static MaxWidth ( string source ) : int
source string
return int