패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.4.7

vy_string_utils

간단한 문자열 및 기타 유형 유틸리티 모음.

AndroidiOSLinuxmacOSWebWindows
30일 다운로드
8.7만
좋아요
2
Pub 점수
160

패키지 설치

flutter pub add vy_string_utils

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

문자열 조작 및 기타 기본 유형 연산을 위한 간단한 유틸리티를 제공하는 가벼운 Flutter/Dart 패키지입니다. 문자열의 정리, 검증, 포맷팅, 변환과 같은 일반적인 작업에 도움이 되는 메서드를 제공하여 코드의 가독성을 높이고 반복 코드를 줄입니다. 어떤 Dart 프로젝트에도 쉽게 통합할 수 있도록 설계되었으며, Android, iOS, 웹, 데스크톱 환경을 포함한 모든 주요 플랫폼을 지원합니다. 무거운 종속성 없이 빠르고 신뢰할 수 있는 문자열 처리 도구를 원하는 개발자에게 적합합니다.

사용 사례

  • 문자열 검증
  • 텍스트 형식 지정
  • 입력 정제
  • 데이터 변환
  • 간단한 텍스트 처리
  • 크로스 플랫폼 문자열 유틸리티

주요 기능

  • 사용하기 쉬운 유틸리티 함수
  • 다수의 플랫폼을 지원합니다
  • 최소 종속성 프로필
  • 깨끗하고 읽기 쉬운 API
  • 문자열 및 기본 유형 연산에 집중
  • 잘 문서화된 메서드

적합한 대상

  • 초보에서 중급 수준의 Dart 개발자
  • 기본 문자열 헬퍼가 필요한 프로젝트
  • 일관된 텍스트 처리가 필요한 앱
  • 경량 유틸리티 필요
  • 빠른 프로토타이핑
  • 웹 및 모바일 애플리케이션

고려 사항

  • 복잡한 파싱을 위한 것이 아님
  • 기본 작업에 국한됨
  • 고급 정규 표현식 또는 국제화 지원 없음
  • 간단한 사용 사례에 가장 적합
  • 기능이 풍부한 텍스트 처리 라이브러리를 대체하지 않습니다

원본 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위