Coder Social home page Coder Social logo

recase's People

Contributors

filiph avatar mit-mit avatar nitehogg avatar tienisto avatar vadimtsushko avatar vasilich6107 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

recase's Issues

Snake case unexpected behavior

    final data = jsonEncode({
      "name": "Moh",
      "nationalId": "12345678912345",
    });

    print(ReCase(data).snakeCase);

results

{"name":"_moh","national_id":"12345678912345"}

Look what happened to the name value, it should be the same as original value Moh, It Unexpectedly is converted to _moh

Code could be simplified

This

String char = new String.fromCharCode(text.codeUnitAt(i));
      String nextChar = (i + 1 == text.length
          ? null
          : new String.fromCharCode(text.codeUnitAt(i + 1)));

could be replaced with

final char = text[i];
final nextChar = i + 1 == text.length ? null : text[i + 1];

Failing to format all uppercase words

String word = 'FOO_BAR';
String niceWord = ReCase(word).camelCase;

I would expect the word to be fooBar instead of fOOBAR.

A workaround is casting the word to lowercase before formatting.

Tilted quotation marks produce non capitalization

Example:

String title = 'ABC “ABC ABC”';
String newTitle = new ReCase(title).titleCase;

Expected newTitle:
'Abc “Abc Abc”';
However, this is returned (notice the diference between the second ABC):
'Abc “abc Abc”';

Hypothesis: I think that the expected result is not reached because the “ character is --for some reason-- considered to be part of the word. Something like that?

Thanks.

Recognize \ (Backslash) as separator

Calling 'foo\bar'.dotCase results 'foo/bar'
Intended result: 'foo.bar'

\ is not recognized as a separator
I'm using ReCase on Flutter Windows, and paths on Windows use backslashes.

Add no-break space as word separator

Currently, ReCase cannot properly handle strings like Arrives in 15\u{00a0}minutes.

Could you please consider adding the no-break space character (\u{00a0}) as an additional/optional word separator?

Consider static extension methods on the String class?

This package seems like a great candidate for static extension methods, e.g.:

import 'package:recase/recase.dart';

main() {
  var str = 'Just_someSample-text';
  print(str.camelCase); // 'justSomeSampleText'
  print(str.constantCase); // 'JUST_SOME_SAMPLE_TEXT'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.