パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.4.7

vy_string_utils

シンプルな文字列およびその他の型のユーティリティのコレクション。

AndroidiOSLinuxmacOSWebWindows
30日間ダウンロード
8.7万
いいね数
2
Pub ポイント
160

パッケージをインストール

flutter pub add vy_string_utils

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

文字列操作およびその他の基本的な型操作のためのシンプルなユーティリティを提供する軽量なFlutter/Dartパッケージです。トリミング、検証、フォーマット、文字列変換などの一般的なタスクに役立つメソッドを備えており、コードの可読性を高め、ボイラープレートを削減します。どのDartプロジェクトにも簡単に統合できるように設計されており、Android、iOS、Web、デスクトップ環境を含むすべての主要プラットフォームをサポートしています。重い依存関係なしに、迅速かつ信頼性の高い文字列処理ツールを求めている開発者に最適です。

用途

  • 文字列の検証
  • テキスト形式設定
  • 入力の整形
  • データ変換
  • シンプルなテキスト処理
  • クロスプラットフォーム文字列ユーティリティ

主な機能

  • 使いやすいユーティリティ関数
  • 複数のプラットフォームをサポートしています
  • 最小限の依存関係フットプリント
  • 洗練された読みやすい API
  • 文字列および基本型の操作に焦点を当てる
  • 十分にドキュメント化されたメソッド

適している対象

  • 初心者から中級者までのDart開発者
  • 基本的な文字列ヘルパーが必要なプロジェクト
  • 一貫したテキスト処理を必要とするアプリ
  • 軽量なユーティリティの必要性
  • 迅速なプロトタイピング
  • Web およびモバイルアプリケーション

注意事項

  • 複雑なパースには向かない
  • 基本操作に限定
  • 高度な正規表現や国際化のサポートなし
  • シンプルなユースケースに最適
  • 機能豊富なテキスト処理ライブラリを置き換えるものではない

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

README

A collection of string utilities.

These utilities simplifies some formatting needs. The main methods are:

  • cut() -> Cuts a String at the required length if bigger or returns the origin otherwise.

  • cutAndAlign() -> Cuts a String or pads it right or left with a certain character to the required length if needed

  • preserveOnlyChars() -> returns a String containing only the required characters. Optionally the removed characters can be substituted by a placeholder.

  • splitInLines() -> split a sentence in lines of the required length based on a given separator.

  • capitalize() -> Capitalize the first character of the string and lowercase the others.

  • onlyContainsDigits() -> returns true if the string contains only digits.

  • onlyContainsAlpha() -> returns true if the string only contains alpha characters (RegExp [a-zA-Z])

  • isDartIdentifier() -> returns true if the characters starting at the given position are a valid Dart identifier.

  • getDartIdentifier() -> return the valid Dart identifier (if any) at certain position in a source string.

    All these methods are presented also as extensions.

license.

Usage

A simple usage example:

import 'package:vy_string_utils/vy_string_utils.dart';

main() {
  print('please cut'.cutAndAlign(15, paddingChar: '*')); // 'please cut*****'

  print('main'.capitalize()); // 'Main'

  print('1953'.onlyContainsDigits()); // true
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。

ランキング