ConsulStringExtensions extension

on

Properties

ansiLength int
Length without ANSI sequences.
no setter

Methods

ansiPad(int length, {String pad = " "}) String
Pad string from both sides, ignoring embedded ansi sequences.
ansiPadLeft(int length, {String pad = " "}) String
Pad string to the left, ignoring embedded ansi sequences.
ansiPadRight(int length, {String pad = " "}) String
Pad string to the right, ignoring embedded ansi sequences.
ansiTake(int count) String
ANSI aware take variant. Includes all ANSI sequences without counting them towards count.
drop(int count) String
Remove the first count bytes from this String. Returns empty String if count >= length.
dropLast(int count) String
Remove the last count bytes from this String. Returns empty String if count >= length.
stripped() String
Removes all embedded ANSI sequences.
take(int count) String
Take the first count characters from this. Ignoring special unicode character handling. This operates on the "pure bytes" only.
takeLast(int count) String
Take the last count characters from this. Ignoring special unicode character handling. This operates on the "pure bytes" only.