C# Class GitHub.Extensions.StringExtensions

Afficher le fichier Open project: github/VisualStudio

Méthodes publiques

Méthode Description
Contains ( this s, string expectedSubstring, System.StringComparison comparison ) : bool
ContainsAny ( this s, IEnumerable characters ) : bool
DebugRepresentation ( [ s ) : string
RemoveSurroundingQuotes ( this s ) : string
StartsWith ( [ s, char c ) : bool
ToInt32 ( this s ) : Int32
ToUriSafe ( this url ) : Uri
Wrap ( this text, int maxLength = 72 ) : string

Wrap a string to the specified length.

Private Methods

Méthode Description
EnsureEndsWith ( [ s, char c ) : string
EnsureStartsWith ( [ s, char c ) : string
LeftBeforeLast ( [ s, string search ) : string
NormalizePath ( [ path ) : string
ParseFileName ( [ path ) : string
ParseParentDirectory ( [ path ) : string
RightAfter ( [ s, string search ) : string
RightAfterLast ( this s, string search ) : string
ToNullIfEmpty ( [ s ) : string
TrimEnd ( [ s, string suffix ) : string

Method Details

Contains() public static méthode

public static Contains ( this s, string expectedSubstring, System.StringComparison comparison ) : bool
s this
expectedSubstring string
comparison System.StringComparison
Résultat bool

ContainsAny() public static méthode

public static ContainsAny ( this s, IEnumerable characters ) : bool
s this
characters IEnumerable
Résultat bool

DebugRepresentation() public static méthode

public static DebugRepresentation ( [ s ) : string
s [
Résultat string

RemoveSurroundingQuotes() public static méthode

public static RemoveSurroundingQuotes ( this s ) : string
s this
Résultat string

StartsWith() public static méthode

public static StartsWith ( [ s, char c ) : bool
s [
c char
Résultat bool

ToInt32() public static méthode

public static ToInt32 ( this s ) : Int32
s this
Résultat System.Int32

ToUriSafe() public static méthode

public static ToUriSafe ( this url ) : Uri
url this
Résultat System.Uri

Wrap() public static méthode

Wrap a string to the specified length.
public static Wrap ( this text, int maxLength = 72 ) : string
text this The text string to wrap
maxLength int The character length to wrap at
Résultat string