Skip to content

T_CodeJam_Strings_StringExtensions

Andrew Koryavchenko edited this page Jul 4, 2017 · 9 revisions

StringExtensions ClassString class extensions.

Inheritance Hierarchy

System.Object
  CodeJam.Strings.StringExtensions
Namespace: CodeJam.Strings
Assembly: CodeJam (in CodeJam.dll) Version: 1.1.0.0 (1.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 methodStatic member FormatWith(String, Object) Replaces one or more format items in a specified string with the string representation of a specified object.
Public methodStatic member FormatWith(String, Object[]) Replaces the format items in a specified string with the string representations of corresponding objects in a specified array.
Public methodStatic member FormatWith(String, Object, Object) Replaces the format items in a specified string with the string representation of two specified objects.
Public methodStatic member FormatWith(String, Object, Object, Object) Replaces the format items in a specified string with the string representation of three specified objects.
Public methodStatic member FromBase64 Converts the specified string, which encodes binary data as base-64 digits, to an equivalent byte array.
Public methodStatic member IsControl Indicates whether the character at the specified position in a specified string is categorized as a control.
Public methodStatic member IsDigit(String) Indicates whether all characters in a specified string is categorized as a digit.
Public methodStatic member IsDigit(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a digit.
Public methodStatic member IsHighSurrogate Indicates whether the character at the specified position in a specified string is categorized as a highsurrogate.
Public methodStatic member IsLetter(String) Indicates whether all characters in a specified string is categorized as a letter.
Public methodStatic member IsLetter(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a letter.
Public methodStatic member IsLetterOrDigit(String) Indicates whether all characters in a specified string is categorized as a letterordigit.
Public methodStatic member IsLetterOrDigit(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a letterordigit.
Public methodStatic member IsLower(String) Indicates whether all characters in a specified string is categorized as a lower.
Public methodStatic member IsLower(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a lower.
Public methodStatic member IsLowSurrogate Indicates whether the character at the specified position in a specified string is categorized as a lowsurrogate.
Public methodStatic member IsNullOrEmpty Infix form of IsNullOrEmpty(String).
Public methodStatic member IsNullOrWhiteSpace Infix form of string.IsNullOrWhiteSpace.
Public methodStatic member IsNumber(String) Indicates whether all characters in a specified string is categorized as a number.
Public methodStatic member IsNumber(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a number.
Public methodStatic member IsPunctuation(String) Indicates whether all characters in a specified string is categorized as a punctuation.
Public methodStatic member IsPunctuation(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a punctuation.
Public methodStatic member IsSeparator(String) Indicates whether all characters in a specified string is categorized as a separator.
Public methodStatic member IsSeparator(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a separator.
Public methodStatic member IsSurrogate Indicates whether the character at the specified position in a specified string is categorized as a surrogate.
Public methodStatic member IsSurrogatePair Indicates whether the character at the specified position in a specified string is categorized as a surrogatepair.
Public methodStatic member IsSymbol(String) Indicates whether all characters in a specified string is categorized as a symbol.
Public methodStatic member IsSymbol(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a symbol.
Public methodStatic member IsUpper(String) Indicates whether all characters in a specified string is categorized as a upper.
Public methodStatic member IsUpper(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a upper.
Public methodStatic member IsWhiteSpace(String) Indicates whether all characters in a specified string is categorized as a whitespace.
Public methodStatic member IsWhiteSpace(String, Int32) Indicates whether the character at the specified position in a specified string is categorized as a whitespace.
Public methodStatic 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 methodStatic member Join(String[], String) Concatenates all the elements of a string array, using the specified separator between each element.
Public methodStatic member Join(T)(IEnumerable(T)) Concatenates the members of a collection.
Public methodStatic member Join(T)(IEnumerable(T), String) Concatenates the members of a collection, using the specified separator between each member.
Public methodStatic member Length Returns length of argument, even if argument is null.
Public methodStatic member NotNullNorEmpty Returns true if argument is not null nor empty.
Public methodStatic member NotNullNorWhiteSpace Returns true if argument is not null nor whitespace.
Public methodStatic member Prefix Retrieves prefix of length length.
Public methodStatic member Remove Removes substring from provided strings.
Public methodStatic member SplitWithTrim Splits source and returns whitespace trimmed parts.
Public methodStatic member Substring Retrieves a substring from str.
Public methodStatic member Suffix Retrieves prefix of length length.
Public methodStatic 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 methodStatic 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 methodStatic 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 methodStatic member ToBytes(String) Encodes all the characters in the specified string into a sequence of bytes using UTF-8 encoding.
Public methodStatic member ToBytes(String, Encoding) Encodes all the characters in the specified string into a sequence of bytes.
Public methodStatic member ToByteSizeString(Int32) Returns size in bytes string representation.
Public methodStatic member ToByteSizeString(Int64) Returns size in bytes string representation.
Public methodStatic member ToByteSizeString(Int32, IFormatProvider) Returns size in bytes string representation.
Public methodStatic member ToByteSizeString(Int64, IFormatProvider) Returns size in bytes string representation.
Public methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic member ToHexString(Byte[]) Creates hex representation of byte array.
Public methodStatic member ToHexString(Byte[], String) Creates hex representation of byte array.
Public methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic member ToInvariantString(T)(T) Culture invariant version of ToString(String, IFormatProvider)
Public methodStatic member ToInvariantString(T)(T, String) Culture invariant version of ToString(String, IFormatProvider)
Public methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic 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 methodStatic member TrimPrefix(String, String) Trims str prefix if it equals to prefix.
Public methodStatic member TrimPrefix(String, String, IEqualityComparer(String)) Trims str prefix if it equals to prefix.
Public methodStatic member TrimSuffix(String, String) Trims str prefix if it equals to suffix.
Public methodStatic member TrimSuffix(String, String, IEqualityComparer(String)) Trims str suffix if it equals to suffix.
Public methodStatic member Unquote(String) Remove one set of leading and trailing double quote characters, if both are present.
Public methodStatic member Unquote(String, Boolean) Remove one set of leading and trailing double quote characters, if both are present.
Public methodStatic 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