FLUTTER ECOSYSTEM

techniboogie-dart/recase

techniboogie-dart/recase open-source repository details.

recase 项目封面
Stars
104
Forks
15
最近推送(UTC)
2024年4月1日
项目状态
未归档
techniboogie-dart GitHub avatar
GITHUB Organization

techniboogie-dart ↗

语言Dart

此仓库发布的插件

使用的依赖

依赖清单 1 项
  • test开发依赖^1.16.8

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

ReCase

Changes the case of the input text to the desire case convention.

import 'package:recase/recase.dart';

void main() {
  ReCase rc = new ReCase('Just_someSample-text');

  print(rc.camelCase); // Prints 'justSomeSampleText'
  print(rc.constantCase); // Prints 'JUST_SOME_SAMPLE_TEXT'
}

String extensions are also available.

import 'package:recase/recase.dart';

void main() {
  String sample = 'Just_someSample-text';

  print(sample.camelCase); // Prints 'justSomeSampleText'
  print(sample.constantCase); // Prints 'JUST_SOME_SAMPLE_TEXT'
}

This feature is available in version 3.0.0, and requires at least Dart 2.6

Supports:

  • snake_case
  • dot.case
  • path/case
  • param-case
  • PascalCase
  • Header-Case
  • Title Case
  • camelCase
  • Sentence case
  • CONSTANT_CASE