C# Class UniversalMarkdown.Helpers.Common

Datei anzeigen Open project: QuinnDamerell/UniversalMarkdown

Public Methods

Method Description
FindNextSingleNewLine ( string markdown, int startingPos, int endingPos, int &startOfNextLine ) : int

Returns the next \n or \r\n in the markdown.

FindNextWhiteSpace ( string markdown, int startingPos, int endingPos, bool ifNotFoundReturnLength ) : int

Finds the next whitespace in a range.

IndexOf ( string markdown, char search, int startingPos, int endingPos, bool reverseSearch = false ) : int

Helper function for index of with a start and an ending.

IndexOf ( string markdown, string search, int startingPos, int endingPos, bool reverseSearch = false ) : int

Helper function for index of with a start and an ending.

IsBlankOrWhiteSpace ( string str ) : bool

Determines if a string is blank or comprised entirely of whitespace characters.

IsWhiteSpace ( char c ) : bool

Determines if a character is a whitespace character.

ParseInlineChildren ( string markdown, int startingPos, int maxEndingPos, bool ignoreLinks = false ) : List

This function can be called by any element parsing. Given a start and stopping point this will parse all found elements out of the range.

ParseLines ( string markdown, int start, int end, int quoteDepth ) : IEnumerable

Parses lines.

SkipQuoteCharacters ( string markdown, int start, int end, int quoteDepth ) : int

Skips a certain number of quote characters (>).

Private Methods

Method Description
Common ( ) : System
FindNextInlineElement ( string markdown, int start, int end, bool ignoreLinks ) : InlineParseResult

Finds the next inline element by matching trip chars and verifying the match.

Method Details

FindNextSingleNewLine() public static method

Returns the next \n or \r\n in the markdown.
public static FindNextSingleNewLine ( string markdown, int startingPos, int endingPos, int &startOfNextLine ) : int
markdown string
startingPos int
endingPos int
startOfNextLine int
return int

FindNextWhiteSpace() public static method

Finds the next whitespace in a range.
public static FindNextWhiteSpace ( string markdown, int startingPos, int endingPos, bool ifNotFoundReturnLength ) : int
markdown string
startingPos int
endingPos int
ifNotFoundReturnLength bool
return int

IndexOf() public static method

Helper function for index of with a start and an ending.
public static IndexOf ( string markdown, char search, int startingPos, int endingPos, bool reverseSearch = false ) : int
markdown string
search char
startingPos int
endingPos int
reverseSearch bool
return int

IndexOf() public static method

Helper function for index of with a start and an ending.
public static IndexOf ( string markdown, string search, int startingPos, int endingPos, bool reverseSearch = false ) : int
markdown string
search string
startingPos int
endingPos int
reverseSearch bool
return int

IsBlankOrWhiteSpace() public static method

Determines if a string is blank or comprised entirely of whitespace characters.
public static IsBlankOrWhiteSpace ( string str ) : bool
str string
return bool

IsWhiteSpace() public static method

Determines if a character is a whitespace character.
public static IsWhiteSpace ( char c ) : bool
c char
return bool

ParseInlineChildren() public static method

This function can be called by any element parsing. Given a start and stopping point this will parse all found elements out of the range.
public static ParseInlineChildren ( string markdown, int startingPos, int maxEndingPos, bool ignoreLinks = false ) : List
markdown string
startingPos int
maxEndingPos int
ignoreLinks bool Indicates whether to parse links.
return List

ParseLines() public static method

Parses lines.
public static ParseLines ( string markdown, int start, int end, int quoteDepth ) : IEnumerable
markdown string
start int
end int
quoteDepth int
return IEnumerable

SkipQuoteCharacters() public static method

Skips a certain number of quote characters (>).
public static SkipQuoteCharacters ( string markdown, int start, int end, int quoteDepth ) : int
markdown string
start int
end int
quoteDepth int The number of quote characters to skip.
return int