StringExtensions Class

Summary

Extension methods on string and System.Text.StringBuilder for common string manipulations.
Assembly
GitVersion.Core.dll
Namespace
GitVersion.Extensions
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["StringExtensions"] class Type type-node

Syntax

public static class StringExtensions

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Methods

Name Value Summary
AppendLineFormat(StringBuilder, string, object[]) void
Appends a formatted line (format + newline) to the System.Text.StringBuilder.
static
IsEquivalentTo(string, string) bool
Returns true when input and other are equal under ordinal case-insensitive comparison.
static
IsNullOrEmpty(string) bool
static
IsNullOrWhiteSpace(string) bool
static
NotNullOrEmpty(string, string) string
Throws System.ArgumentException when value is null or empty; otherwise returns the value.
static
NotNullOrWhitespace(string, string) string
Throws System.ArgumentException when value is null, empty, or whitespace; otherwise returns the value.
static
RegexReplace(string, string, string) string
Replaces all occurrences of pattern in input with replace using the regex cache.
static
WithPrefixIfNotNullOrEmpty(string, string) string
Prepends prefix to input when the value is non-empty; returns the original value otherwise.
static