C# Class Sage.XsltExtensions.String

ファイルを表示 Open project: igorfrance/sage

Public Methods

Method Description
contains ( string subject, string value ) : bool

Returns a value indicating whether the specified value exists in the specified subject.

containsAny ( string subject, string values ) : bool

Returns a value indicating whether the specified subject contains any one of the specified values (split on comma and space).

format ( string value, string param1 ) : string

Formats the specified string value using the specified formatting parameters.

format ( string value, string param1, string param2 ) : string

Formats the specified string value using the specified formatting parameters.

format ( string value, string param1, string param2, string param3 ) : string

Formats the specified string value using the specified formatting parameters.

format ( string value, string param1, string param2, string param3, string param4 ) : string

Formats the specified string value using the specified formatting parameters.

format ( string value, string param1, string param2, string param3, string param4, string param5 ) : string

Formats the specified string value using the specified formatting parameters.

join ( XPathNodeIterator selection, string separator ) : string

Joins the specified selection using the specified separator.

lowerCase ( string value ) : string

Returns the value converted to lower case

matches ( string value, string expression ) : bool

Returns a value indicating whether the specified value matches the specified regular expression string.

replace ( string value, string expression, string replacement ) : string

Searched the specified value for expression and replaces it with specified replacement.

replace ( string value, string expression, string replacement, int regexOptions ) : string

Searched the specified value for expression and replaces it with specified replacement.

split ( string subject, string separator ) : XPathNodeIterator

Splits the specified subject, using the specified separator and returns a node iterator around the generated result.

substitute ( string pattern, string query ) : string

Substitutes the placeholders in the specified pattern using the parameters specified with query.

The query should be formatted as a URL query string. The placeholders are names surrounded with curly braces.

substitute ( string pattern, string name1, string value1 ) : string

Substitutes the placeholders in the specified pattern using the parameters specified.

substitute ( string pattern, string name1, string value1, string name2, string value2 ) : string

Substitutes the placeholders in the specified pattern using the parameters specified.

trim ( string subject ) : string

Trims the specified subject string.

trim ( string subject, string chars ) : string

Trims the specified chars from the specified subject string.

trim ( string subject, string chars, string separator ) : string

Trims all specified chars from the specified subject string, using the separator to split the chars.

trimSourceCode ( string subject ) : string

Trims the source code of initial indent characters.

trimSourceCode ( string subject, string tabChars ) : string

Trims the source code of initial indent characters.

trimSourceCode ( string subject, string tabChars, string lineIndent ) : string

Trims the source code of initial indent characters.

upperCase ( string value ) : string

Returns the value converted to upper case

upperCaseFirst ( string value ) : string

Returns the value with it's first char converted to upper case

Private Methods

Method Description
unquoteReplacement ( string replacement ) : string

Method Details

contains() public method

Returns a value indicating whether the specified value exists in the specified subject.
public contains ( string subject, string value ) : bool
subject string The string to search.
value string The value to look for.
return bool

containsAny() public method

Returns a value indicating whether the specified subject contains any one of the specified values (split on comma and space).
public containsAny ( string subject, string values ) : bool
subject string The string to search.
values string The list of values (comma or space-separated) to look for.
return bool

format() public method

Formats the specified string value using the specified formatting parameters.
public format ( string value, string param1 ) : string
value string The string to format.
param1 string The first substitution value.
return string

format() public method

Formats the specified string value using the specified formatting parameters.
public format ( string value, string param1, string param2 ) : string
value string The string to format.
param1 string The first substitution value.
param2 string The second substitution value.
return string

format() public method

Formats the specified string value using the specified formatting parameters.
public format ( string value, string param1, string param2, string param3 ) : string
value string The string to format.
param1 string The first substitution value.
param2 string The second substitution value.
param3 string The third substitution value.
return string

format() public method

Formats the specified string value using the specified formatting parameters.
public format ( string value, string param1, string param2, string param3, string param4 ) : string
value string The string to format.
param1 string The first substitution value.
param2 string The second substitution value.
param3 string The third substitution value.
param4 string The fourth substitution value.
return string

format() public method

Formats the specified string value using the specified formatting parameters.
public format ( string value, string param1, string param2, string param3, string param4, string param5 ) : string
value string The string to format.
param1 string The first substitution value.
param2 string The second substitution value.
param3 string The third substitution value.
param4 string The fourth substitution value.
param5 string The fifth substitution value.
return string

join() public method

Joins the specified selection using the specified separator.
public join ( XPathNodeIterator selection, string separator ) : string
selection System.Xml.XPath.XPathNodeIterator The selection.
separator string The separator.
return string

lowerCase() public method

Returns the value converted to lower case
public lowerCase ( string value ) : string
value string The string to process.
return string

matches() public method

Returns a value indicating whether the specified value matches the specified regular expression string.
public matches ( string value, string expression ) : bool
value string The value to check.
expression string The expression to look for.
return bool

replace() public method

Searched the specified value for expression and replaces it with specified replacement.
public replace ( string value, string expression, string replacement ) : string
value string The string to replace.
expression string The expression to look for.
replacement string The replacement string to substitute with.
return string

replace() public method

Searched the specified value for expression and replaces it with specified replacement.
public replace ( string value, string expression, string replacement, int regexOptions ) : string
value string The string to replace.
expression string The expression to look for.
replacement string The replacement string to substitute with.
regexOptions int The regex options to use.
return string

split() public method

Splits the specified subject, using the specified separator and returns a node iterator around the generated result.
public split ( string subject, string separator ) : XPathNodeIterator
subject string The subject.
separator string The separator.
return System.Xml.XPath.XPathNodeIterator

substitute() public method

Substitutes the placeholders in the specified pattern using the parameters specified with query.
The query should be formatted as a URL query string. The placeholders are names surrounded with curly braces.
public substitute ( string pattern, string query ) : string
pattern string The pattern string with placeholders.
query string The query string with substitution values.
return string

substitute() public method

Substitutes the placeholders in the specified pattern using the parameters specified.
public substitute ( string pattern, string name1, string value1 ) : string
pattern string The pattern string with placeholders.
name1 string The name1.
value1 string The value1.
return string

substitute() public method

Substitutes the placeholders in the specified pattern using the parameters specified.
public substitute ( string pattern, string name1, string value1, string name2, string value2 ) : string
pattern string The pattern string with placeholders.
name1 string The name1.
value1 string The value1.
name2 string The name2.
value2 string The value2.
return string

trim() public method

Trims the specified subject string.
public trim ( string subject ) : string
subject string The subject.
return string

trim() public method

Trims the specified chars from the specified subject string.
public trim ( string subject, string chars ) : string
subject string The subject to trim from.
chars string The chars to trim.
return string

trim() public method

Trims all specified chars from the specified subject string, using the separator to split the chars.
public trim ( string subject, string chars, string separator ) : string
subject string The subject to trim from.
chars string The chars to trim.
separator string The separator.
return string

trimSourceCode() public method

Trims the source code of initial indent characters.
public trimSourceCode ( string subject ) : string
subject string The subject.
return string

trimSourceCode() public method

Trims the source code of initial indent characters.
public trimSourceCode ( string subject, string tabChars ) : string
subject string The subject.
tabChars string The chars to replace the tabs with.
return string

trimSourceCode() public method

Trims the source code of initial indent characters.
public trimSourceCode ( string subject, string tabChars, string lineIndent ) : string
subject string The subject.
tabChars string The chars to replace the tabs with.
lineIndent string The indent chars to use at the start of each line.
return string

upperCase() public method

Returns the value converted to upper case
public upperCase ( string value ) : string
value string The string to process.
return string

upperCaseFirst() public method

Returns the value with it's first char converted to upper case
public upperCaseFirst ( string value ) : string
value string The string to process.
return string