Skip to content

T_CodeJam_Strings_StringExtensions

Andrew Koryavchenko edited this page Jun 17, 2018 · 9 revisions

StringExtensions ClassString class extensions.

Inheritance Hierarchy

System.Object
  CodeJam.Strings.StringExtensions
Namespace: CodeJam.Strings
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static class StringExtensions

VB

<ExtensionAttribute>
Public NotInheritable Class StringExtensions

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type StringExtensions =  class end

The StringExtensions type exposes the following members.

Methods

 

Name Description
Public method Static member EmptyIfNull Returns an empty string for null value.
Public method Static member FormatWith(String, Object) Replaces one or more format items in a specified string with the string representation of a specified object.
Public method Static member FormatWith(String, Object[]) Replaces the format items in a specified string with the string representations of corresponding objects in a specified array.
Public method Static member FormatWith(String, Object, Object) Replaces the format items in a specified string with the string representation of two specified objects.
Public method Static member FormatWith(String, Object, Object, Object) Replaces the format items in a specified string with the string representation of three specified objects.
Public method Static member FromBase64 Converts the specified string, which encodes binary data as base-64 digits, to an equivalent byte array.
Public method Static member IsControl Indicates whether the character at the specified position in a specified string is categorized as a control.
Public method Static member IsDigit(String) Indicates whether all characters in a specified string is categorized as a digit.
Public method Static member IsDigit(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a digit.
Public method Static member IsHighSurrogate Indicates whether the character at the specified position in a specified string is categorized as a highsurrogate.
Public method Static member IsLetter(String) Indicates whether all characters in a specified string is categorized as a letter.
Public method Static member IsLetter(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a letter.
Public method Static member IsLetterOrDigit(String) Indicates whether all characters in a specified string is categorized as a letterordigit.
Public method Static member IsLetterOrDigit(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a letterordigit.
Public method Static member IsLower(String) Indicates whether all characters in a specified string is categorized as a lower.
Public method Static member IsLower(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a lower.
Public method Static member IsLowSurrogate Indicates whether the character at the specified position in a specified string is categorized as a lowsurrogate.
Public method Static member IsNullOrEmpty Infix form of IsNullOrEmpty(String).
Public method Static member IsNullOrWhiteSpace Infix form of string.IsNullOrWhiteSpace.
Public method Static member IsNumber(String) Indicates whether all characters in a specified string is categorized as a number.
Public method Static member IsNumber(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a number.
Public method Static member IsPunctuation(String) Indicates whether all characters in a specified string is categorized as a punctuation.
Public method Static member IsPunctuation(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a punctuation.
Public method Static member IsSeparator(String) Indicates whether all characters in a specified string is categorized as a separator.
Public method Static member IsSeparator(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a separator.
Public method Static member IsSurrogate Indicates whether the character at the specified position in a specified string is categorized as a surrogate.
Public method Static member IsSurrogatePair Indicates whether the character at the specified position in a specified string is categorized as a surrogatepair.
Public method Static member IsSymbol(String) Indicates whether all characters in a specified string is categorized as a symbol.
Public method Static member IsSymbol(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a symbol.
Public method Static member IsUpper(String) Indicates whether all characters in a specified string is categorized as a upper.
Public method Static member IsUpper(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a upper.
Public method Static member IsWhiteSpace(String) Indicates whether all characters in a specified string is categorized as a whitespace.
Public method Static member IsWhiteSpace(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a whitespace.
Public method Static member Join(IEnumerable(String), String) Concatenates the members of a constructed IEnumerable(T) collection of type String, using the specified separator between each member.
Public method Static member Join(String[], String) Concatenates all the elements of a string array, using the specified separator between each element.
Public method Static member Join(T)(IEnumerable(T)) Concatenates the members of a collection.
Public method Static member Join(T)(IEnumerable(T), String) Concatenates the members of a collection, using the specified separator between each member.
Public method Static member Length Returns length of argument, even if argument is null.
Public method Static member NotNullNorEmpty Returns true if argument is not null nor empty.
Public method Static member NotNullNorWhiteSpace Returns true if argument is not null nor whitespace.
Public method Static member NullIfEmpty Returns null for empty strings.
Public method Static member Prefix Retrieves prefix of length length.
Public method Static member Remove Removes substring from provided strings.
Public method Static member SplitWithTrim Splits source and returns whitespace trimmed parts.
Public method Static member Substring Retrieves a substring from str.
Public method Static member Suffix Retrieves prefix of length length.
Public method Static member ToBase64 Converts an array of bytes to its equivalent string representation that is encoded with base-64 digits. A parameter specifies whether to insert line breaks in the return value.
Public method Static member ToByte Converts the string representation of a number in a specified style and culture-specific format to its Byte equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToByteInvariant Converts the string representation of a number in a specified style and culture-invariant format to its Byte equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToBytes(String) Encodes all the characters in the specified string into a sequence of bytes using UTF-8 encoding.
Public method Static member ToBytes(String, Encoding) Encodes all the characters in the specified string into a sequence of bytes.
Public method Static member ToByteSizeString(Int32) Returns size in bytes string representation.
Public method Static member ToByteSizeString(Int64) Returns size in bytes string representation.
Public method Static member ToByteSizeString(Int32, IFormatProvider) Returns size in bytes string representation.
Public method Static member ToByteSizeString(Int64, IFormatProvider) Returns size in bytes string representation.
Public method Static member ToDateTime Converts the string representation of a number in a specified style and culture-specific format to its Byte equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToDateTimeInvariant Converts the string representation of a number in a specified style and culture-invariant format to its DateTime equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToDecimal Converts the string representation of a number in a specified style and culture-specific format to its Decimal equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToDecimalInvariant Converts the string representation of a number in a specified style and culture-invariant format to its Decimal equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToDouble Converts the string representation of a number in a specified style and culture-specific format to its Double equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToDoubleInvariant Converts the string representation of a number in a specified style and culture-invariant format to its Double equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToHexString(Byte[]) Creates hex representation of byte array.
Public method Static member ToHexString(Byte[], String) Creates hex representation of byte array.
Public method Static member ToInt16 Converts the string representation of a number in a specified style and culture-specific format to its Int16 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToInt16Invariant Converts the string representation of a number in a specified style and culture-invariant format to its Int16 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToInt32 Converts the string representation of a number in a specified style and culture-specific format to its Int32 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToInt32Invariant Converts the string representation of a number in a specified style and culture-invariant format to its Int32 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToInt64 Converts the string representation of a number in a specified style and culture-specific format to its Int64 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToInt64Invariant Converts the string representation of a number in a specified style and culture-invariant format to its Int64 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToInvariantString(T)(T) Culture invariant version of ToString(String, IFormatProvider)
Public method Static member ToInvariantString(T)(T, String) Culture invariant version of ToString(String, IFormatProvider)
Public method Static member ToSByte Converts the string representation of a number in a specified style and culture-specific format to its SByte equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToSByteInvariant Converts the string representation of a number in a specified style and culture-invariant format to its SByte equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToSingle Converts the string representation of a number in a specified style and culture-specific format to its Single equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToSingleInvariant Converts the string representation of a number in a specified style and culture-invariant format to its Single equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToUInt16 Converts the string representation of a number in a specified style and culture-specific format to its UInt16 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToUInt16Invariant Converts the string representation of a number in a specified style and culture-invariant format to its UInt16 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToUInt32 Converts the string representation of a number in a specified style and culture-specific format to its UInt32 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToUInt32Invariant Converts the string representation of a number in a specified style and culture-invariant format to its UInt32 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToUInt64 Converts the string representation of a number in a specified style and culture-specific format to its UInt64 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member ToUInt64Invariant Converts the string representation of a number in a specified style and culture-invariant format to its UInt64 equivalent. A return value indicates whether the conversion succeeded.
Public method Static member TrimPrefix(String, String) Trims str prefix if it equals to prefix.
Public method Static member TrimPrefix(String, String, IEqualityComparer(String)) Trims str prefix if it equals to prefix.
Public method Static member TrimSuffix(String, String) Trims str prefix if it equals to suffix.
Public method Static member TrimSuffix(String, String, IEqualityComparer(String)) Trims str suffix if it equals to suffix.
Public method Static member Unquote(String) Remove one set of leading and trailing double quote characters, if both are present.
Public method Static member Unquote(String, Boolean) Remove one set of leading and trailing double quote characters, if both are present.
Public method Static member Unquote(String, Char, Boolean) Remove one set of leading and trailing dquotationChar, if both are present.
  Back to Top

See Also

Reference

CodeJam.Strings Namespace

Clone this wiki locally