Dela via


PathString.StartsWithSegments Method

Definition

Overloads

StartsWithSegments(PathString)

Determines whether the beginning of this PathString instance matches the specified PathString.

StartsWithSegments(PathString, PathString)

Determines whether the beginning of this PathString instance matches the specified PathString and returns the remaining segments.

StartsWithSegments(PathString, StringComparison)

Determines whether the beginning of this PathString instance matches the specified PathString when compared using the specified comparison option.

StartsWithSegments(PathString, PathString, PathString)

Determines whether the beginning of this PathString instance matches the specified PathString and returns the matched and remaining segments.

StartsWithSegments(PathString, StringComparison, PathString)

Determines whether the beginning of this PathString instance matches the specified PathString when compared using the specified comparison option and returns the remaining segments.

StartsWithSegments(PathString, StringComparison, PathString, PathString)

Determines whether the beginning of this PathString instance matches the specified PathString when compared using the specified comparison option and returns the matched and remaining segments.

StartsWithSegments(PathString)

Source:
PathString.cs
Source:
PathString.cs
Source:
PathString.cs

Determines whether the beginning of this PathString instance matches the specified PathString.

public:
 bool StartsWithSegments(Microsoft::AspNetCore::Http::PathString other);
public bool StartsWithSegments (Microsoft.AspNetCore.Http.PathString other);
member this.StartsWithSegments : Microsoft.AspNetCore.Http.PathString -> bool
Public Function StartsWithSegments (other As PathString) As Boolean

Parameters

other
PathString

The PathString to compare.

Returns

true if value matches the beginning of this string; otherwise, false.

Remarks

When the other parameter contains a trailing slash, the PathString being checked must either exactly match or include a trailing slash. For instance, for a PathString of "/a/b", this method will return true for "/a", but will return false for "/a/". Whereas, a PathString of "/a//b/" will return true when compared with "/a/".

Applies to

StartsWithSegments(PathString, PathString)

Source:
PathString.cs
Source:
PathString.cs
Source:
PathString.cs

Determines whether the beginning of this PathString instance matches the specified PathString and returns the remaining segments.

public:
 bool StartsWithSegments(Microsoft::AspNetCore::Http::PathString other, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Http::PathString % remaining);
public bool StartsWithSegments (Microsoft.AspNetCore.Http.PathString other, out Microsoft.AspNetCore.Http.PathString remaining);
member this.StartsWithSegments : Microsoft.AspNetCore.Http.PathString * PathString -> bool
Public Function StartsWithSegments (other As PathString, ByRef remaining As PathString) As Boolean

Parameters

other
PathString

The PathString to compare.

remaining
PathString

The remaining segments after the match.

Returns

true if value matches the beginning of this string; otherwise, false.

Remarks

When the other parameter contains a trailing slash, the PathString being checked must either exactly match or include a trailing slash. For instance, for a PathString of "/a/b", this method will return true for "/a", but will return false for "/a/". Whereas, a PathString of "/a//b/" will return true when compared with "/a/".

Applies to

StartsWithSegments(PathString, StringComparison)

Source:
PathString.cs
Source:
PathString.cs
Source:
PathString.cs

Determines whether the beginning of this PathString instance matches the specified PathString when compared using the specified comparison option.

public:
 bool StartsWithSegments(Microsoft::AspNetCore::Http::PathString other, StringComparison comparisonType);
public bool StartsWithSegments (Microsoft.AspNetCore.Http.PathString other, StringComparison comparisonType);
member this.StartsWithSegments : Microsoft.AspNetCore.Http.PathString * StringComparison -> bool
Public Function StartsWithSegments (other As PathString, comparisonType As StringComparison) As Boolean

Parameters

other
PathString

The PathString to compare.

comparisonType
StringComparison

One of the enumeration values that determines how this PathString and value are compared.

Returns

true if value matches the beginning of this string; otherwise, false.

Remarks

When the other parameter contains a trailing slash, the PathString being checked must either exactly match or include a trailing slash. For instance, for a PathString of "/a/b", this method will return true for "/a", but will return false for "/a/". Whereas, a PathString of "/a//b/" will return true when compared with "/a/".

Applies to

StartsWithSegments(PathString, PathString, PathString)

Source:
PathString.cs
Source:
PathString.cs
Source:
PathString.cs

Determines whether the beginning of this PathString instance matches the specified PathString and returns the matched and remaining segments.

public:
 bool StartsWithSegments(Microsoft::AspNetCore::Http::PathString other, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Http::PathString % matched, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Http::PathString % remaining);
public bool StartsWithSegments (Microsoft.AspNetCore.Http.PathString other, out Microsoft.AspNetCore.Http.PathString matched, out Microsoft.AspNetCore.Http.PathString remaining);
member this.StartsWithSegments : Microsoft.AspNetCore.Http.PathString * PathString * PathString -> bool
Public Function StartsWithSegments (other As PathString, ByRef matched As PathString, ByRef remaining As PathString) As Boolean

Parameters

other
PathString

The PathString to compare.

matched
PathString

The matched segments with the original casing in the source value.

remaining
PathString

The remaining segments after the match.

Returns

true if value matches the beginning of this string; otherwise, false.

Remarks

When the other parameter contains a trailing slash, the PathString being checked must either exactly match or include a trailing slash. For instance, for a PathString of "/a/b", this method will return true for "/a", but will return false for "/a/". Whereas, a PathString of "/a//b/" will return true when compared with "/a/".

Applies to

StartsWithSegments(PathString, StringComparison, PathString)

Source:
PathString.cs
Source:
PathString.cs
Source:
PathString.cs

Determines whether the beginning of this PathString instance matches the specified PathString when compared using the specified comparison option and returns the remaining segments.

public:
 bool StartsWithSegments(Microsoft::AspNetCore::Http::PathString other, StringComparison comparisonType, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Http::PathString % remaining);
public bool StartsWithSegments (Microsoft.AspNetCore.Http.PathString other, StringComparison comparisonType, out Microsoft.AspNetCore.Http.PathString remaining);
member this.StartsWithSegments : Microsoft.AspNetCore.Http.PathString * StringComparison * PathString -> bool
Public Function StartsWithSegments (other As PathString, comparisonType As StringComparison, ByRef remaining As PathString) As Boolean

Parameters

other
PathString

The PathString to compare.

comparisonType
StringComparison

One of the enumeration values that determines how this PathString and value are compared.

remaining
PathString

The remaining segments after the match.

Returns

true if value matches the beginning of this string; otherwise, false.

Remarks

When the other parameter contains a trailing slash, the PathString being checked must either exactly match or include a trailing slash. For instance, for a PathString of "/a/b", this method will return true for "/a", but will return false for "/a/". Whereas, a PathString of "/a//b/" will return true when compared with "/a/".

Applies to

StartsWithSegments(PathString, StringComparison, PathString, PathString)

Source:
PathString.cs
Source:
PathString.cs
Source:
PathString.cs

Determines whether the beginning of this PathString instance matches the specified PathString when compared using the specified comparison option and returns the matched and remaining segments.

public:
 bool StartsWithSegments(Microsoft::AspNetCore::Http::PathString other, StringComparison comparisonType, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Http::PathString % matched, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Http::PathString % remaining);
public bool StartsWithSegments (Microsoft.AspNetCore.Http.PathString other, StringComparison comparisonType, out Microsoft.AspNetCore.Http.PathString matched, out Microsoft.AspNetCore.Http.PathString remaining);
member this.StartsWithSegments : Microsoft.AspNetCore.Http.PathString * StringComparison * PathString * PathString -> bool
Public Function StartsWithSegments (other As PathString, comparisonType As StringComparison, ByRef matched As PathString, ByRef remaining As PathString) As Boolean

Parameters

other
PathString

The PathString to compare.

comparisonType
StringComparison

One of the enumeration values that determines how this PathString and value are compared.

matched
PathString

The matched segments with the original casing in the source value.

remaining
PathString

The remaining segments after the match.

Returns

true if value matches the beginning of this string; otherwise, false.

Remarks

When the other parameter contains a trailing slash, the PathString being checked must either exactly match or include a trailing slash. For instance, for a PathString of "/a/b", this method will return true for "/a", but will return false for "/a/". Whereas, a PathString of "/a//b/" will return true when compared with "/a/".

Applies to