Show / Hide Table of Contents

Class Utils

Inheritance
System.Object
Utils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Parsing
Assembly: NFX.dll
Syntax
public static class Utils

Methods

CapturePatternMatch(String, String, Char, StringComparison)

Returns a captured wildcard segment from string. Pattern uses '*' for match capture by default and may contain a single capture

Declaration
public static string CapturePatternMatch(this string str, string pattern, char wc = '*', StringComparison comparisonType = StringComparison.InvariantCultureIgnoreCase)
Parameters
Type Name Description
System.String str
System.String pattern
System.Char wc
System.StringComparison comparisonType
Returns
Type Description
System.String

IsURLValid(String)

Checks URL string for validity

Declaration
public static bool IsURLValid(this string url)
Parameters
Type Name Description
System.String url
Returns
Type Description
System.Boolean

MakeSentenceLines(String)

Puts every sentence on a separate line

Declaration
public static string MakeSentenceLines(this string text)
Parameters
Type Name Description
System.String text
Returns
Type Description
System.String

MatchPattern(String, String, Char, Char, Boolean)

Returns true if supplied string matches pattern that can contain multiple char span (*) wildcards and multiple single-char (?) wildcards

Declaration
public static bool MatchPattern(this string str, string pattern, char wc = '*', char wsc = '?', bool senseCase = false)
Parameters
Type Name Description
System.String str
System.String pattern
System.Char wc
System.Char wsc
System.Boolean senseCase
Returns
Type Description
System.Boolean

ParseFieldNameToDescription(String, Boolean)

Parses database field names (column names) and converts parts to human-readable description like: "FIRST_NAME" -> "First Name", "FirstName" -> "First Name", "CHART_OF_ACCOUNTS" -> "Chart of Accounts"

Declaration
public static string ParseFieldNameToDescription(this string fieldName, bool capitalize)
Parameters
Type Name Description
System.String fieldName
System.Boolean capitalize
Returns
Type Description
System.String
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX