FLUTTER ECOSYSTEM

PlugFox/multiline

다중 줄 문자열 레코드에 메서드 확장을 통해 편리한 접근을 제공합니다.

다중 줄 프로젝트 이미지
Stars
6
Forks
0
최근 푸시(UTC)
2022. 8. 18.
프로젝트 상태
활성
Plague Fox GitHub avatar
GITHUB User

Plague Fox ↗

Talks about @dart-lang and @flutter

Not in Education, Employment, or TrainingMoon
언어Dart

기술 주제

사용 중인 의존성

의존성 목록 2 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

multiline

https://github.com/PlugFox/multiline/raw/master/.img/logo.png

Actions Status Coverage Pub Code size License: WTFPL effective_dart GitHub 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 a Iterable<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

https://codecov.io/gh/PlugFox/multiline/branch/master/graphs/sunburst.svg

Changelog

Refer to the Changelog to get all release notes.

Maintainers

Plague Fox

License

WTFPL