Specifies options for applicable StringSegment.Split method overloads,
such as whether to omit empty substrings from the returned array or trim whitespace from segments.
See the Remarks section for details.
See the Remarks section for details.
Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0-preview.3
Syntax
public readonly struct StringSegmentSplitOptions : IEquatable<StringSegmentSplitOptions>
The StringSegmentSplitOptions type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() | Equals(Object) |
Determines whether the specified object is equal to this instance.
(Overrides ValueTypeEquals(Object).) |
![]() | Equals(StringSegmentSplitOptions) |
Indicates whether the current StringSegmentSplitOptions instance is equal to another one specified in the other parameter.
|
![]() | GetHashCode |
Returns a hash code for this StringSegmentSplitOptions instance.
(Overrides ValueTypeGetHashCode.) |
![]() | ToString |
Gets the string representation of this StringSegmentSplitOptions instance.
(Overrides ValueTypeToString.) |
Operators
Name | Description | |
---|---|---|
![]() ![]() | BitwiseAnd |
Performs a bitwise AND operation on the provided operands.
|
![]() ![]() | BitwiseOr |
Performs a bitwise OR operation on the provided operands.
|
![]() ![]() | Equality |
Determines whether two specified StringSegmentSplitOptions instances have the same value.
|
![]() ![]() | (Int32 to StringSegmentSplitOptions) |
Performs an explicit conversion from Int32 to StringSegmentSplitOptions.
|
![]() ![]() | (StringSegmentSplitOptions to Int32) |
Performs an explicit conversion from StringSegmentSplitOptions to Int32.
|
![]() ![]() | (StringSegmentSplitOptions to StringSplitOptions) |
Performs an explicit conversion from StringSegmentSplitOptions to StringSplitOptions.
|
![]() ![]() | (Boolean to StringSegmentSplitOptions) | Obsolete.
Performs an implicit conversion from bool to StringSegmentSplitOptions.
This member is obsolete and is specified to provide compatibility with the old StringSegment.Split overloads, which used to specify a boolean removeEmptyEntries argument in place of the new StringSegmentSplitOptions type. |
![]() ![]() | (StringSplitOptions to StringSegmentSplitOptions) |
Performs an implicit conversion from StringSplitOptions to StringSegmentSplitOptions.
|
![]() ![]() | Inequality |
Determines whether two specified StringSegmentSplitOptions instances have different values.
|
![]() ![]() | OnesComplement |
Performs a bitwise NOT operation on the specified value.
|
Fields
Name | Description | |
---|---|---|
![]() ![]() | None |
Represents the default options when splitting string segments by the Split method overloads.
|
![]() ![]() | RemoveEmptyEntries |
Omits elements that contain an empty string segment from the result. When combined with the TrimEntries option,
then whitespace-only segments will also be omitted.
|
![]() ![]() | TrimEntries |
Trims white-space characters from each string segment in the result. When combined with the RemoveEmptyEntries option,
then whitespace-only segments will also be omitted.
|
Extension Methods
Name | Description | |
---|---|---|
![]() | Convert(Type, CultureInfo) | Overloaded.
Converts an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example. |
![]() ![]() | ConvertTTarget(CultureInfo) | Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)See the Remarks section for details. |
![]() | In |
Gets whether item is among the elements of set.
(Defined by ObjectExtensions.)See the Examples section of the generic InT(T, T) overload for an example. |
![]() | TryConvert(Type, Object) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
![]() | TryConvert(Type, CultureInfo, Object) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
![]() | TryConvertTTarget(TTarget) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
![]() | TryConvertTTarget(CultureInfo, TTarget) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
Remarks
The StringSegmentSplitOptions is specified as a struct rather than an enum, so it can be compatible both with StringSplitOptions and the old StringSegment.Split methods that defined a simple bool removeEmptyEntries parameter as options.
Unlike StringSplitOptions, this struct defines the TrimEntries option for all platform targets.
See Also