Click or drag to resize

StringParser Class

Like the Excel CSV Parser, only better.
Inheritance Hierarchy
SystemObject
  GSF.ParsingStringParser

Namespace: GSF.Parsing
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
public static class StringParser
View Source

The StringParser type exposes the following members.

Methods
 NameDescription
Public methodStatic memberExpectedFieldNamesMatch Validates that expected field names match field names found.
Public methodStatic memberFindIndex Finds the index of the first matching (or containing) field name
Public methodStatic memberGetBetweenDelimiters Returns the string that is between two delimiter strings beginning the first startDelimiter found. ALSO, returns the index of the payload (the index of the first char past the startDelimiter)
Public methodStatic memberIndexOfMatchingCloseToken(String, Char, Char, Int32, Boolean) Looks to the RIGHT for the first open token and returns the matching close token
Public methodStatic memberIndexOfMatchingCloseToken(String, String, String, Int32, Boolean) Looks to the RIGHT for the first open token and returns the matching close token
Public methodStatic memberIndexOfNextToken(String, Char, Int32, Int32, Boolean) Finds the index of the "n" occurrence of a character (a token) within a string
Public methodStatic memberIndexOfNextToken(String, String, Int32, Int32, Boolean) Finds the index of the "n" occurrence of one string (a token) within another
Public methodStatic memberIndexOfNextTokens Finds the index of the "n" occurrence any one of the chars in the token array within a string
Public methodStatic memberIndexOfPreviousToken(String, Char, Int32, Int32, Boolean) Processing from RIGHT to LEFT, finds the index of the "n" occurrence of a character (a token) within a string
Public methodStatic memberIndexOfPreviousToken(String, String, Int32, Int32, Boolean) Processing from RIGHT to LEFT, finds the index of the "n"occurrence of one string (a token) within a string
Public methodStatic memberIndicesOfToken(String, Char, Int32, Boolean) Returns an array indices where the token char was found. Null for no tokens found.
Public methodStatic memberIndicesOfToken(String, String, Int32, Boolean) Returns an array of indices where the token string was found
Public methodStatic memberIndicesOfTokens Returns an array of the indices where the token chars were found. Null for no tokens found.
Public methodStatic memberParseCheck Parses strings and validates they match expected type codes.
Public methodStatic memberParseLine Parses a line based on a collection of quote and delimiter characters,
Public methodStatic memberParseStandardCSV Parses a line based on a comma as the separator. Commas wrapped in matched double quotes are not separators. Matched double quotes are normally removed prior to field return. Fields are NOT trimmed of white spaces prior to return.
Top
See Also