StringBetweenExtensions extension
Extension methods for extracting content between delimiters.
- on
Methods
-
between(
String start, String end, {bool endOptional = true, bool trim = true}) → String -
Available on String, provided by the StringBetweenExtensions extension
Returns the content between the first occurrence ofstartandend. -
betweenBrackets(
) → String? -
Available on String, provided by the StringBetweenExtensions extension
Returns the content between the first matching bracket pair found, ornullif none is found. -
betweenBracketsResult(
) → BetweenResult? -
Available on String, provided by the StringBetweenExtensions extension
Returns a BetweenResult of (content between brackets, remaining string) for the first matching bracket pair found. -
betweenBracketsResultLast(
) → BetweenResult? -
Available on String, provided by the StringBetweenExtensions extension
Returns a BetweenResult likebetweenBracketsResultbut searches from the end. -
betweenLast(
String start, String end, {bool endOptional = true, bool trim = true}) → String -
Available on String, provided by the StringBetweenExtensions extension
Returns the content between the last occurrence ofstartandend. -
betweenResult(
String start, String end, {bool endOptional = false, bool trim = true}) → BetweenResult? -
Available on String, provided by the StringBetweenExtensions extension
Returns a BetweenResult of content betweenstartandenddelimiters plus the remaining string, ornullif not found. -
betweenResultLast(
String start, String end, {bool endOptional = true, bool trim = true}) → BetweenResult? -
Available on String, provided by the StringBetweenExtensions extension
Returns a BetweenResult likebetweenResultbut searches from the end usingstartandenddelimiters. -
betweenSplit(
String start, String end, {bool endOptional = true, bool trim = true}) → List< String> ? -
Available on String, provided by the StringBetweenExtensions extension
Returns a list of all sections found betweenstartandenddelimiters, ornullif none are found. -
removeBetweenAll(
String start, String end, {bool inclusive = true}) → String -
Available on String, provided by the StringBetweenExtensions extension
Returns a new string with all content betweenstartandenddelimiters removed.