C# 클래스 YAXLib.StringUtils

Provides string utility methods
파일 보기 프로젝트 열기: sinairv/YAXLib

공개 메소드들

메소드 설명
CombineLocationAndElementName ( string location, System.Xml.Linq.XName elemName ) : string

Combines a location string and an element name to form a bigger location string.

DivideLocationOneStep ( string location, string &newLocation, string &newElem ) : bool

Divides the location string one step, to form a shorter location string.

ExttractPathAndAliasFromLocationString ( string locationString, string &path, string &alias ) : void

Extracts the path and alias from location string. A pure path location string: level1/level2 A location string augmented with alias: level1/level2#somename Here path is "level1/level2" and alias is "somename".

GetArrayDimsString ( int dims ) : string

Gets the string corresponidng to the given array dimensions.

IsLocationAllGeneric ( string location ) : bool

Determines whether the specified location is composed of levels which are themselves either "." or "..".

IsSingleLocationGeneric ( string location ) : bool

Determines whether the specified location string is either "." or "..".

LooksLikeExpandedXName ( string name ) : bool

Heuristically determines if the supplied name conforms to the "expanded XML name" form supported by the System.Xml.Linq.XName class.

ParseArrayDimsString ( string str ) : int[]

Parses the array dimensions string, and returns the corresponding dimensions array.

ParseDateTimeTimeZoneSafe ( string str, IFormatProvider formatProvider ) : System.DateTime
RefineLocationString ( string elemAddr ) : string

Refines the location string. Trims it, and replaces invlalid characters with underscore.

RefineSingleElement ( string elemName ) : string

Refines a single element name. Refines the location string. Trims it, and replaces invlalid characters with underscore.

SplitPathNamespaceSafe ( this value ) : IEnumerable

Splits a string at each instance of a '/' except where such slashes are within {}.

비공개 메소드들

메소드 설명
IsInRange ( char ch, char lower, char upper ) : bool
IsValidNameChar ( char ch ) : bool
IsValidNameStartChar ( char ch ) : bool

메소드 상세

CombineLocationAndElementName() 공개 정적인 메소드

Combines a location string and an element name to form a bigger location string.
public static CombineLocationAndElementName ( string location, System.Xml.Linq.XName elemName ) : string
location string The location string.
elemName System.Xml.Linq.XName Name of the element.
리턴 string

DivideLocationOneStep() 공개 정적인 메소드

Divides the location string one step, to form a shorter location string.
public static DivideLocationOneStep ( string location, string &newLocation, string &newElem ) : bool
location string The location string to divide.
newLocation string The new location string which is one level shorter.
newElem string The element name removed from the end of location string.
리턴 bool

ExttractPathAndAliasFromLocationString() 공개 정적인 메소드

Extracts the path and alias from location string. A pure path location string: level1/level2 A location string augmented with alias: level1/level2#somename Here path is "level1/level2" and alias is "somename".
public static ExttractPathAndAliasFromLocationString ( string locationString, string &path, string &alias ) : void
locationString string The location string.
path string The path to be extracted.
alias string The alias to be extracted.
리턴 void

GetArrayDimsString() 공개 정적인 메소드

Gets the string corresponidng to the given array dimensions.
public static GetArrayDimsString ( int dims ) : string
dims int The array dimensions.
리턴 string

IsLocationAllGeneric() 공개 정적인 메소드

Determines whether the specified location is composed of levels which are themselves either "." or "..".
public static IsLocationAllGeneric ( string location ) : bool
location string The location string to check.
리턴 bool

IsSingleLocationGeneric() 공개 정적인 메소드

Determines whether the specified location string is either "." or "..".
public static IsSingleLocationGeneric ( string location ) : bool
location string The location string to check.
리턴 bool

LooksLikeExpandedXName() 공개 정적인 메소드

Heuristically determines if the supplied name conforms to the "expanded XML name" form supported by the System.Xml.Linq.XName class.
public static LooksLikeExpandedXName ( string name ) : bool
name string The name to be examined.
리턴 bool

ParseArrayDimsString() 공개 정적인 메소드

Parses the array dimensions string, and returns the corresponding dimensions array.
public static ParseArrayDimsString ( string str ) : int[]
str string The string to parse.
리턴 int[]

ParseDateTimeTimeZoneSafe() 공개 정적인 메소드

public static ParseDateTimeTimeZoneSafe ( string str, IFormatProvider formatProvider ) : System.DateTime
str string
formatProvider IFormatProvider
리턴 System.DateTime

RefineLocationString() 공개 정적인 메소드

Refines the location string. Trims it, and replaces invlalid characters with underscore.
public static RefineLocationString ( string elemAddr ) : string
elemAddr string The element address to refine.
리턴 string

RefineSingleElement() 공개 정적인 메소드

Refines a single element name. Refines the location string. Trims it, and replaces invlalid characters with underscore.
public static RefineSingleElement ( string elemName ) : string
elemName string Name of the element.
리턴 string

SplitPathNamespaceSafe() 공개 정적인 메소드

Splits a string at each instance of a '/' except where such slashes are within {}.
public static SplitPathNamespaceSafe ( this value ) : IEnumerable
value this The string to split
리턴 IEnumerable