StringSegmentExtensionsReadToSeparator(StringSegment, String) Method
Advances the specified
rest parameter after the next
separator and returns
the consumed part without the
separator. If
rest started with
separator
before the call, then an empty segment is returned. If the whole
StringSegment has been processed, then
rest
will be
StringSegment.Null after returning.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
public static StringSegment ReadToSeparator(
this ref StringSegment rest,
string separator
)
<ExtensionAttribute>
Public Shared Function ReadToSeparator (
ByRef rest As StringSegment,
separator As String
) As StringSegment
public:
[ExtensionAttribute]
static StringSegment ReadToSeparator(
StringSegment% rest,
String^ separator
)
[<ExtensionAttribute>]
static member ReadToSeparator :
rest : StringSegment byref *
separator : string -> StringSegment
- rest StringSegment
- Represents the rest of the string to process. When this method returns, the value of this
parameter will be the remaining unprocessed part, or StringSegment.Null if the whole segment has been processed.
- separator String
- The separator string to search in the specified StringSegment.
StringSegmentA
StringSegment that contains the first segment of the original value of the
rest parameter delimited by the specified
separator,
or the complete original value of
rest if it contained no more separators.In Visual Basic and C#, you can call this method as an instance method on any object of type
StringSegment. 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).