Class
StringExtensions

Common functions we'll want to use on Strings. Fiddler makes extensive use of strings which should be interpreted in a case-insensitive manner.

WARNING: Methods assume that the calling object is not null, which is lame for reliability but arguably good for performance.

Definition

Namespace:Fiddler

Assembly:FiddlerCore.dll

Syntax:

cs-api-definition
public static class StringExtensions

Inheritance: objectStringExtensions

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()

Methods

OICContains(string, string)

Declaration

cs-api-definition
public static bool OICContains(this string inStr, string toMatch)

Parameters

inStr

string

toMatch

string

Returns

bool

OICEndsWith(string, string)

Declaration

cs-api-definition
public static bool OICEndsWith(this string inStr, string toMatch)

Parameters

inStr

string

toMatch

string

Returns

bool

OICEndsWithAny(string, params string[])

Declaration

cs-api-definition
public static bool OICEndsWithAny(this string inStr, params string[] toMatch)

Parameters

inStr

string

toMatch

string[]

Returns

bool

OICEquals(string, string)

Declaration

cs-api-definition
public static bool OICEquals(this string inStr, string toMatch)

Parameters

inStr

string

toMatch

string

Returns

bool

OICStartsWith(string, string)

Declaration

cs-api-definition
public static bool OICStartsWith(this string inStr, string toMatch)

Parameters

inStr

string

toMatch

string

Returns

bool

OICStartsWithAny(string, params string[])

Declaration

cs-api-definition
public static bool OICStartsWithAny(this string inStr, params string[] toMatch)

Parameters

inStr

string

toMatch

string[]

Returns

bool

TrimAfter(string, char)

Returns the "Head" of a string, before and not including the first instance of specified delimiter.

Declaration

cs-api-definition
public static string TrimAfter(this string str, char delimiter)

Parameters

str

string

The string to trim from.

delimiter

char

The delimiting character at which the trim should end.

Returns

string

Part of a string up to (but not including) chDelim, or the full string if chDelim was not found.