Skip to content

T_CodeJam_Strings_StringExtensions

andrewvk edited this page Apr 25, 2016 · 9 revisions

StringExtensions Class

[This is preliminary documentation and is subject to change.]

String class extensions.

Inheritance Hierarchy

System.Object
  CodeJam.Strings.StringExtensions
Namespace: CodeJam.Strings
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.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 IsNullOrWhiteSpace(String).
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 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 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(Int64) Returns size in bytes string representation.
Public methodStatic member ToByteSizeString(Int64, IFormatProvider) Returns size in bytes string representation.
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 ToHexString(Byte[]) Creates hex representation of byte array.
Public methodStatic member ToHexString(Byte[], String) Creates hex representation of byte array.
Public methodStatic member ToInt Converts the string representation of a number in a specified style and culture-specific format to its 32-bit signed integer 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 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