multiline
Provides convenient access to multiline String records with method extensions.
- Stars
- 6
- Forks
- 0
- Last push (UTC)
- Aug 18, 2022
- Project status
- Active
Original README
English project snapshot. Visit GitHub for the latest content.
multiline
About
Provides convenient access to multiline String records with method extensions.
Useful for templates, mockups and SQL queries.
Just use the symbol "|" to indicate the beginning of a line.
Beautiful code formatting using some useful extensions to the String methods.
Available method extensions:
-
multiline()- return formatted with pipeline symbol "|"String. -
multilineSplit()- splits the string and returns aIterable<String>of substrings.
You can use custom "pipeline" and "join" symbols.
For example
import 'package:multiline/multiline.dart'; // <= import package
void main() {
/// Return formatted with pipeline symbol "`|`" [String].
final string =
'''
|/*
| * List of books and the number of
| * authors associated with each book
| */
|SELECT
| `books`.`title` AS `Title`,
| count(*) AS `Authors`
|FROM `books`
|JOIN `authors`
| ON `books`.`isbn` = `authors`.`isbn`
|GROUP BY
| `books`.`title`
|ORDER BY
| `books`.`title` ASC
|;
'''.multiline();
print(string);
/// Splits the string and returns a [Iterable] of substrings.
final iterable =
'''
| * One
| * Two
| * Three
'''.multilineSplit();
iterable.forEach(print);
}
Coverage
Changelog
Refer to the Changelog to get all release notes.
Maintainers
License
Categories
Dependencies used
How do I choose a repository?
Start with your use case, compare repository activity, and check the original project before adopting it.
- Search by repository name, owner or description, then narrow the results by topic.
- Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
- Read the README, license and issues on GitHub before using a project.
Sources and maintenance
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
- PlugFox/multiline · GitHub ↗
- GitHub Docs — Saving repositories with stars ↗
- Directory maintained by Ducafecat ↗
