string_scanner
string_scanner copied to clipboard
A class for parsing strings using a sequence of patterns.
Please consider adding these methods ```dart /// Scans until [delimiter] matches [string] at the current position. /// /// Returns `true` if something is consumed, `false` otherwise. bool scanUntil(Pattern delimiter) {...
Adding a static type makes the API easier to use correctly. The call site can easily inline the `Uri.parse` if necessary.
here is my code ``` class _MyHomePageState extends State { StringScanner _scanner = StringScanner(testStr); @override Widget build(BuildContext context) { print('$_scanner'); print('${_scanner.scan(RegExp(r'/\*(.|\n)*\*/'))}'); return Container( child: Text('test'), ); } } ``` It...