isPasteSafe static method
- String text
Returns whether text is safe to paste into a terminal.
Checks for dangerous control characters that could execute unintended commands.
final safe = GhosttyVt.isPasteSafe('ls -la');
assert(safe == true);
Implementation
static bool isPasteSafe(String text) {
final bytes = utf8.encode(text);
return isPasteSafeBytes(bytes);
}