Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Provides convenient access to multiline String records with method extensions.

License

NotificationsYou must be signed in to change notification settings

PlugFox/multiline

Repository files navigation

Actions StatusCoveragePubCode sizeLicense: WTFPLeffective_dartGitHub stars

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 packagevoidmain() {/// 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 theChangelog to get all release notes.

Maintainers

Plague Fox

License

WTFPL

About

Provides convenient access to multiline String records with method extensions.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp