funkblubber/lib/string_utils.dart

7 lines
225 B
Dart
Raw Permalink Normal View History

String cutTrailingDash(final String path) =>
path.endsWith('/') && path.length > 1
? path.substring(0, path.length - 1)
: path;
String sanitizePath(final String rawPath) => rawPath.replaceAll('/', '\\');