StringExtensionsAsSegment(String, Int32) Method
Gets a
StringSegment instance, which represents a segment of the specified
string.
No new string allocation occurs when using this method.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.2.0
public static StringSegment AsSegment(
this string s,
int offset
)
<ExtensionAttribute>
Public Shared Function AsSegment (
s As String,
offset As Integer
) As StringSegment
public:
[ExtensionAttribute]
static StringSegment AsSegment(
String^ s,
int offset
)
[<ExtensionAttribute>]
static member AsSegment :
s : string *
offset : int -> StringSegment
- s String
- The string to create the StringSegment from.
- offset Int32
- The offset that points to the first character of the returned segment.
StringSegmentA
StringSegment instance, which represents a segment of the specified
string.In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).