wrapStyle method

String wrapStyle(
  1. String string,
  2. AnsiStyle style
)

Wraps the given string with the ANSI style, if the current terminal supports ANSI escape codes. Note that it will reset to the default color after the string, which may or may not be the same as the previous color.

Implementation

String wrapStyle(final String string, final cli.AnsiStyle style) {
  return style.wrap(string);
}