Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 4.94 KB

Assorted.Utils.Text.StringExtensions.md

File metadata and controls

47 lines (35 loc) · 4.94 KB

StringExtensions Class

Namespace: Assorted.Utils.Text
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0
Inheritance: object StringExtensions

Extends the System.String type.

Syntax

public static class StringExtensions

Methods

Method Description
DamerauLevenshteinSimilarityTo(this string, string) Returns the normalized Damerau-Levenshtein distance between two strings.
JaroSimilarityTo(this string, string) Returns the normalized Jaro distance between two strings.
JaroWinklerSimilarityTo(this string, string, int) Returns the normalized Jaro-Winkler distance between two strings.
LastPartition(this string, char) Splits the string at the last occurrence of a specified Unicode character and returns the substrings before and after the separator.
LastPartition(this string, string) Splits the string at the last occurrence of a specified string and returns the substrings before and after the separator.
LazySplit(this string, char, StringSplitOptions) Returns the substrings in this string that are delimited by a specified Unicode character.
MatchingCharsWith(this string, string) Returns the number of leading and trailing Unicode characters that appear in both strings.
Partition(this string, char) Splits the string at the first occurrence of a specified Unicode character and returns the substrings before and after the separator.
Partition(this string, string) Splits the string at the first occurrence of a specified string and returns the substrings before and after the separator.
SubstringAfter(this string, char) Retrieves a substring from this instance. The substring starts after the first occurrence of a specified Unicode character and continues to the end of the string.
SubstringAfter(this string, string) Retrieves a substring from this instance. The substring starts after the first occurrence of a specified string and continues to the end of the string.
SubstringAfterLast(this string, char) Retrieves a substring from this instance. The substring starts after the last occurrence of a specified Unicode character and continues to the end of the string.
SubstringAfterLast(this string, string) Retrieves a substring from this instance. The substring starts after the last occurrence of a specified string and continues to the end of the string.
SubstringBefore(this string, char) Retrieves a substring from this instance. The substring starts at the beginning of the string and continues until the first occurrence of a specified Unicode character.
SubstringBefore(this string, string) Retrieves a substring from this instance. The substring starts at the beginning of the string and continues until the first occurrence of a specified string.
SubstringBeforeLast(this string, char) Retrieves a substring from this instance. The substring starts at the beginning of the string and continues until the last occurrence of a specified Unicode character.
SubstringBeforeLast(this string, string) Retrieves a substring from this instance. The substring starts at the beginning of the string and continues until the last occurrence of a specified string.

Thread Safety

Any public static member of this type is thread-safe, but instance members are not guaranteed to be thread-safe.

See Also


This document is generated by DG.