Extend.NET.String 2024.9.9.1414

dotnet add package Extend.NET.String --version 2024.9.9.1414                
NuGet\Install-Package Extend.NET.String -Version 2024.9.9.1414                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Extend.NET.String" Version="2024.9.9.1414" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Extend.NET.String --version 2024.9.9.1414                
#r "nuget: Extend.NET.String, 2024.9.9.1414"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Extend.NET.String as a Cake Addin
#addin nuget:?package=Extend.NET.String&version=2024.9.9.1414

// Install Extend.NET.String as a Cake Tool
#tool nuget:?package=Extend.NET.String&version=2024.9.9.1414                

Extend.NET.String

Last Updated: 2024-09-09 14:14:17

📖 Overview

Extend.NET.String is part of the Extend.NET suite, providing a collection of powerful and easy-to-use extension methods for String types in .NET applications. These extensions aim to simplify common tasks and enhance developer productivity.

🧰 Extension Methods

Capitalize

Capitalizes the first character of the string.

Center

Centers the string within a specified total width.

ContainsAll

Determines whether the string contains all of the specified substrings.

ContainsAny

Determines whether the string contains any of the specified substrings.

CountOccurrences

Counts the number of occurrences of a substring within the string.

Decrypt

Decrypts the string using AES decryption.

Encrypt

Encrypts the string using AES encryption.

FirstCharacter

Returns the first character of the string.

FromBase64

Converts a Base64 string back to its original string representation.

FromByteArray

Converts a byte array to a string using UTF-8 encoding.

FromCompressed

Decompresses a GZip compressed string.

FromHexString

Converts a hexadecimal string back to its original string representation.

FromUrlEncoded

Decodes a URL-encoded string.

IsAlphabetic

Determines whether the string contains only alphabetic characters.

IsAlphanumeric

Determines whether the string contains only alphanumeric characters.

IsLower

Determines whether all characters in the string are lowercase.

IsNullOrEmpty

Determines whether the specified string is null or empty.

IsNullOrWhiteSpace

Determines whether the specified string is null, empty, or consists only of white-space characters.

IsNumeric

Determines whether the string contains only numeric characters.

IsUpper

Determines whether all characters in the string are uppercase.

IsValidCreditCard

Checks if the string is a valid credit card number using the Luhn algorithm.

IsValidDateTime

Determines whether the string can be parsed as a valid DateTime.

IsValidEmail

Checks if the string is a valid email address.

IsValidGuid

Determines whether the string is a valid GUID.

IsValidIpAddress

Checks if the string is a valid IP address (IPv4 or IPv6).

IsValidPhoneNumber

Determines whether the string is a valid phone number.

IsValidUrl

Checks if the string is a valid URL.

LastCharacter

Returns the last character of the string.

Left

Returns a string containing a specified number of characters from the left side of a string.

Pad

Pads the string to a specified length with a specified character.

RemoveDiacritics

Removes diacritics (accents) from the string.

RemoveFirst

Removes the first occurrence of the specified string from the source string.

RemoveLast

Removes the last occurrence of the specified string from the source string.

RemoveNonNumeric

Removes all non-numeric characters from the string.

RemovePrefix

Removes the specified prefix from the string if it exists.

RemoveSpecialCharacters

Removes all special characters from the string, leaving only letters and numbers.

RemoveSuffix

Removes the specified suffix from the string if it exists.

RemoveWhitespace

Removes all whitespace characters from the string.

Repeat

Repeats the string a specified number of times.

ReplaceFirst

Replaces the first occurrence of a specified string with another string.

ReplaceLast

Replaces the last occurrence of a specified string with another string.

Reverse

Reverses the characters in the string.

Returns a string containing a specified number of characters from the right side of a string.

SplitCamelCase

Splits a camelCase or PascalCase string into separate words.

StripHtml

Removes HTML tags from the string.

ToAbbreviation

Converts a string to its abbreviated form.

ToAlphanumericOnly

Removes all non-alphanumeric characters from the string.

ToAlternateCase

Alternates the case of each character in the string.

ToBase64

Converts the string to its Base64 representation.

ToByteArray

Converts the string to a byte array using UTF-8 encoding.

ToCamelCase

Converts the string to camelCase.

ToCapitalized

Capitalizes the first character of the string and leaves the rest unchanged.

ToCapitalizedWords

Capitalizes the first letter of each word in the string.

ToCapitalizeEveryNthWord

Capitalizes every nth word in the string.

ToCapitalizeFirstLetter

Capitalizes the first letter of the string.

ToCapitalizeFirstLetterOfEachSentence

Capitalizes the first letter of each sentence in the string.

ToCapitalizeFirstLetterOfEachWord

Capitalizes the first letter of each word in the string.

ToCapitalizeFirstLetterOfSentences

Capitalizes the first letter of each sentence in the string.

ToCapitalizeWords

Capitalizes the first letter of each word in the string.

ToCompressed

Compresses the string using GZip compression.

ToCountConsonants

Counts the number of consonants in the string.

ToCountDistinctCharacters

Counts the number of distinct characters in the string.

ToCountOccurrencesIgnoreCase

Counts the number of occurrences of a substring within the string, ignoring case.

ToCountSentences

Counts the number of sentences in the string.

ToCountUniqueWords

Counts the number of unique words in the string.

ToCountVowels

Counts the number of vowels in the string.

ToCountWords

Counts the number of words in the string.

ToEnum

Converts the string to an enum value of type T.

ToEscapedString

Escapes special characters in the string for use in a regular expression.

ToExpandTabs

Expands tab characters in the string to spaces.

ToFirstCharacterLowerCase

Converts the first character of the string to lowercase.

ToFixedWidth

Converts the string to a fixed width by truncating or padding as necessary.

ToHexString

Converts the string to a hexadecimal string.

ToIndentedString

Indents each line of the string by a specified number of spaces.

ToInitialism

Converts the string to an initialism (acronym) by taking the first letter of each word.

ToInitials

Converts the string to initials.

ToInsertAt

Inserts a string at the specified index.

ToIsAllUnique

Checks if all characters in the string are unique.

ToIsAnagram

Checks if the string is an anagram of another string.

ToIsBalancedBrackets

Checks if the string has balanced brackets (parentheses, square brackets, and curly braces).

ToIsBalancedParentheses

Checks if the string has balanced parentheses.

ToIsPalindrome

Checks if the string is a palindrome (reads the same forwards and backwards).

ToKebabCase

Converts the string to kebab-case.

ToKeepOnlyConsonants

Keeps only the consonants in the string, removing all other characters.

ToKeepOnlyDigits

Keeps only the digits in the string, removing all other characters.

ToKeepOnlyVowels

Keeps only the vowels in the string, removing all other characters.

ToLevenshteinDistance

Calculates the Levenshtein distance between two strings.

ToMasked

Masks a portion of the string with a specified character.

ToMd5Hash

Computes the MD5 hash of the string.

ToNormalizedString

Normalizes the string by removing diacritics and converting to lowercase.

ToOrdinal

Converts a numeric string to its ordinal representation.

ToPascalCase

Converts the string to PascalCase.

ToPlural

Converts the singular form of a word to its plural form.

ToProperCase

Converts the string to proper case (first letter of each word capitalized).

ToRemoveAccents

Removes all accents from the string.

ToRemoveAllConsonants

Removes all consonants from the string.

ToRemoveAllDigits

Removes all digits from the string.

ToRemoveAllExcept

Removes all characters from the string except the specified ones.

ToRemoveAllNonLetterCharacters

Removes all non-letter characters from the string.

ToRemoveAllVowels

Removes all vowels from the string.

ToRemoveAllWhitespace

Removes all whitespace characters from the string.

ToRemoveConsecutiveDuplicates

Removes consecutive duplicate characters from the string.

ToRemoveDuplicateCharacters

Removes duplicate characters from the string, keeping only the first occurrence of each character.

ToRemoveDuplicateWhitespace

Removes duplicate whitespace characters from the string.

ToRemoveEmptyLines

Removes all empty lines from the string.

ToRemoveEveryNthWord

Removes every nth word from the string.

ToRemoveExtraSpaces

Removes extra spaces between words, leaving only single spaces.

ToRemoveNonAlphabetic

Removes all non-alphabetic characters from the string.

ToRemoveNonAlphanumeric

Removes all non-alphanumeric characters from the string.

ToRemoveNonAsciiCharacters

Removes all non-ASCII characters from the string.

ToRemoveNonLetterOrDigit

Removes all characters that are not letters or digits from the string.

ToRemoveNonPrintableCharacters

Removes all non-printable characters from the string.

ToRemoveRange

Removes a range of characters from the string.

ToRemoveWordsContaining

Removes all words containing a specified substring from the string.

ToRemoveWordsEndingWith

Removes all words ending with a specified suffix from the string.

ToRemoveWordsStartingWith

Removes all words starting with a specified prefix from the string.

ToRemoveWordsWithLength

Removes all words with a specified length from the string.

ToReplaceAt

Replaces the character at the specified index with a new character.

ToReplaceConsonants

Replaces all consonants in the string with a specified character.

ToReplaceEveryNthWord

Replaces every nth word in the string with a specified replacement.

ToReplaceFirstOccurrence

Replaces the first occurrence of a specified string with another string.

ToReplaceIgnoreCase

Replaces all occurrences of a specified string in the current instance with another specified string, ignoring case.

ToReplaceLastOccurrence

Replaces the last occurrence of a specified string with another string.

ToReplaceLineEndings

Replaces all line endings in the string with a specified line ending.

ToReplaceMultiple

Replaces multiple substrings in the string with their corresponding replacements.

ToReplaceNonAlphabetic

Replaces all non-alphabetic characters in the string with a specified character.

ToReplaceNonAsciiCharacters

Replaces all non-ASCII characters in the string with a specified character.

ToReplaceNonLetterOrDigit

Replaces all characters that are not letters or digits in the string with a specified character.

ToReplaceNonPrintableCharacters

Replaces all non-printable characters in the string with a specified character.

ToReplaceVowels

Replaces all vowels in the string with a specified character.

ToReplaceWithCase

Replaces occurrences of a string with another string, preserving the case of the original.

ToReplaceWordsContaining

Replaces all words containing a specified substring with a given replacement.

ToReplaceWordsNotContaining

Replaces all words not containing a specified substring with a given replacement.

ToReplaceWordsWithLength

Replaces all words with a specified length in the string with a given replacement.

ToReverseCase

Reverses the case of each character in the string.

ToReversedWords

Reverses the order of words in the string.

ToReverseEachWord

Reverses each word in the string while maintaining word order.

ToReverseWords

Reverses the order of words in the string.

ToReverseWordsInSentences

Reverses the order of words in each sentence of the string.

ToRot13

Applies ROT13 encoding to the string.

ToRotate

Rotates the string by a specified number of positions.

ToSafeFileName

Converts the string to a safe file name by removing invalid characters.

ToSecureString

Converts the string to a SecureString.

ToSentenceCase

Converts the string to sentence case.

ToSha256Hash

Computes the SHA256 hash of the string.

ToShuffle

Shuffles the characters in the string randomly.

ToSingular

Converts the plural form of a word to its singular form.

ToSlug

Converts the string to a URL-friendly slug.

ToSnakeCase

Converts the string to snake_case.

ToSplitIntoChunks

Splits the string into chunks of a specified size.

ToSplitIntoNGrams

Splits the string into n-grams of the specified size.

ToSplitIntoSentences

Splits the string into an array of sentences.

ToSplitOnFirstOccurrence

Splits the string into two parts at the first occurrence of the specified separator.

ToSplitOnLastOccurrence

Splits the string into two parts at the last occurrence of the specified separator.

ToSplitPascalCase

Splits a PascalCase string into separate words.

ToStringWithOrdinal

Converts a numeric string to a string with an ordinal suffix (e.g., "1st", "2nd", "3rd", "4th").

ToSwapCase

Swaps the case of each character in the string.

ToTitleCase

Converts the specified string to title case (except for words that are entirely in uppercase, which are considered to be acronyms).

ToTitleCaseInvariant

Converts the string to title case using the invariant culture.

ToTitleCaseWithExceptions

Converts the string to title case, but keeps specified words in lowercase.

ToToggleCase

Toggles the case of each character in the string.

ToTrimEnd

Removes all trailing occurrences of a specified string from the current string.

ToTrimmedEnd

Trims the end of the string and ensures it doesn't exceed a maximum length.

ToTrimmedLines

Splits the string into trimmed lines, removing empty lines.

ToTrimmedStart

Trims the start of the string and ensures it doesn't exceed a maximum length.

ToTrimmedString

Trims the string and replaces multiple whitespace characters with a single space.

ToTrimStart

Removes all leading occurrences of a specified string from the current string.

ToTruncatedString

Truncates the string to a specified length and adds an ellipsis if truncated.

ToUnescapedString

Unescapes a string that has been escaped for use in a regular expression.

ToUrlEncoded

Encodes the string for use in a URL.

ToWordArray

Splits the string into an array of words.

ToWordCount

Counts the number of words in the string.

int

Calculates the frequency of each word in the string.

ToWordWrap

Wraps words in the string to ensure that no line exceeds the specified width.

ToWrappedLines

Wraps the string to a specified line length.

ToWrappedString

Wraps the string to a specified width.

Truncate

Truncates the string to a specified length and adds an ellipsis (...) if it exceeds that length.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2024.9.9.1414 100 9/9/2024
2024.9.9.1402 88 9/9/2024
2024.9.9.1338 92 9/9/2024
2024.9.9.1335 89 9/9/2024
2024.9.9.1320 89 9/9/2024
2024.9.9.1225 94 9/9/2024
2024.9.9.1052 97 9/9/2024
2024.9.9.1044 91 9/9/2024
2024.9.9.1004 90 9/9/2024
2024.9.8.1721 82 9/8/2024
2024.9.8.1712 84 9/8/2024
2024.9.8.1708 82 9/8/2024
2024.9.8.1702 79 9/8/2024
2024.9.8.1658 81 9/8/2024
2024.9.8.1617 82 9/8/2024
2024.9.8.1532 80 9/8/2024
2024.9.8.1451 77 9/8/2024