techniboogie-dart / recase Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
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
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];
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.
If a word contains works like HBO or CNG etc, after formatting it bring spaces between them like H B O or C N G.
Can anyone help me how to resolve it?
Thanks
.titleCase
changes i
to I
instead of İ
Can you provide a quick fix?
I have tried with ş ç ğ ü ö
They become Ş Ç Ğ Ü Ö
so no problem.
THANKS for this great package
The symbol list:
final symbolSet = {' ', '.', '/', '_', '\\', '-'};
Doesn't contain +
symbol.
Can I add it?
Here is a screenshots
The performance of recase regex's adds a lot to the rendering time.
Are there any techniques for improving performance?
Hi, using Title Case on the word iPhone results in I Phone, is there a quick fix for this?
TitleCase is not returning proper TitleCase as defined by the NYT.
example:
Add a person manually with an address
returns as
Add A Person Manually With An Address
expected:
Add a Person Manually With an Address
.
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.
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.
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?
_upperAlphaRegex.hasMatch('Ü')
gives false
for german(and i suppose all other non A-Z
) symbols
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'
}
Description
As a developer, having a pascalDotCase would be great for .NET developers that may be using the mason tool. For example, in .NET, the namespaces follow this standard/guideline: https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces
TL;DR, the casing would look like this "Hello.World"
Requirements
Additional Context
I will be creating a PR for this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.