dart_pkpass/lib/src/utils/lproj_parser.dart
The one with the braid e345763813 feat: add String localization support
Signed-off-by: The one with the braid <the-one@with-the-braid.cf>
2023-08-27 19:50:37 +02:00

10 lines
344 B
Dart

abstract class LProjParser {
const LProjParser._();
static Map<String, String> parse(String stringsFile) => Map.fromEntries(
RegExp(r'"((?:\\"|[^"])*)"\s?=\s?"((?:\\"|[^"])*)"\s?;')
.allMatches(stringsFile)
.map(
(match) => MapEntry(match.group(1)!, match.group(2)!),
),
);
}