wrapWithBracket method
Implementation
String wrapWithBracket(BracketType type) {
switch (type) {
// Wrap with round brackets.
case BracketType.rounded:
return "($this)";
// Wrap with square brackets.
case BracketType.square:
return "[$this]";
// Wrap with curly brackets.
case BracketType.curly:
return "{$this}";
// Wrap with angle brackets.
case BracketType.angle:
return "<$this>";
// Wrap with single quotes.
case BracketType.singleQuote:
return "'$this'";
// Wrap with double quotes.
case BracketType.doubleQuote:
return "\"$this\"";
}
}