dotless_i 0.1.2

  • README.md
  • Example
  • Installing
  • Versions
  • --

dotless_i

Turkish String upper-lower case converter and comparator functions for Dart. This library is necessary workaround because currently Dart only supports default unicode mappings for casing and default rules does not work for Turkish i->İ and I->ı conversions.

Name of the library is "dotless i" because the notorious "ı" character (together with İ) caused countless trouble in computing for Turkish. Case methods can be used for some other Turkic alphabets as well (such as Azerbaijani). Current implementation does not handle two code unit variations yet. Complete special casing rules are defined here : (ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt)

Usage Example:

import 'package:dotless_i/dotless_i.dart';
...
var inputL = "kısa şiir"; 
print("UpperCase for [$inputL]");
print("Default= ${inputL.toUpperCase()}, Turkish=${toUpperCaseTr(inputL)}\n");

var inputU = "KISA ŞİİR";	 
print("LowerCase for [$inputU]");
print("Default= ${inputU.toLowerCase()}, Turkish=${toLowerCaseTr(inputU)}\n");  
  
var list = ["Az","ağ","aç","ad"];
print("Input= $list");
print("Default Sort= ${list..sort()}");
  
list = ["Az","ağ","aç","ad"];  
print("Turkish Sort= ${list..sort(TURKISH_STRING_COMPARATOR)}"); 

list = ["Az","ağ","aç","ad"];  
print("Turkish Sort Ignore Case= ${list..sort(TURKISH_STRING_COMPARATOR_IGNORE_CASE)}"); 	

Output:
UpperCase for [kısa şiir]
Default= KISA ŞIIR, Turkish=KISA ŞİİR

LowerCase for [KISA ŞİİR]
Default= kisa şiir, Turkish=kısa şiir

Input= [Az, ağ, aç, ad]
Default Sort= [Az, ad, aç, ağ]
Turkish Sort= [Az, aç, ad, ağ]
Turkish Sort Ignore Case= [aç, ad, ağ, Az]	

Change List

0.1.2 Add ignore-case comparator (by mdakin). Documentation fixes.
0.1.1 Remove unnecessary checks that are already handled by default case conversion. Documentation changes after G+ discussion.
0.1.0 Initial Release.

example/example.dart

import 'package:dotless_i/dotless_i.dart';

main() {
  // upperCaseTr
  var inputL = "kısa şiir"; 
  print("UpperCase for [$inputL]");
  print("Default= ${inputL.toUpperCase()}, Turkish=${toUpperCaseTr(inputL)}\n");
  
  // lowerCaseTr
  var inputU = "KISA ŞİİR";  
  print("LowerCase for [$inputU]");
  print("Default= ${inputU.toLowerCase()}, Turkish=${toLowerCaseTr(inputU)}\n");  
    
  // sort Default
  var list = ["Az","ağ","aç","ad"];
  print("Input= $list");
  print("Default Sort= ${list..sort()}");
    
  // sort Turkish  
  list = ["Az","ağ","aç","ad"];  
  print("Turkish Sort= ${list..sort(TURKISH_STRING_COMPARATOR)}"); 
  
  // sort Turkish ignore case  
  list = ["Az","ağ","aç","ad"];  
  print("Turkish Sort Ignore Case= ${list..sort(TURKISH_STRING_COMPARATOR_IGNORE_CASE)}");  
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dotless_i: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dotless_i/dotless_i.dart';
  
Version Uploaded Documentation Archive
0.1.6 Jan 26, 2018 Go to the documentation of dotless_i 0.1.6 Download dotless_i 0.1.6 archive
0.1.5 Nov 8, 2013 Go to the documentation of dotless_i 0.1.5 Download dotless_i 0.1.5 archive
0.1.4 Aug 27, 2013 Go to the documentation of dotless_i 0.1.4 Download dotless_i 0.1.4 archive
0.1.3 Aug 24, 2013 Go to the documentation of dotless_i 0.1.3 Download dotless_i 0.1.3 archive
0.1.2 Aug 24, 2013 Go to the documentation of dotless_i 0.1.2 Download dotless_i 0.1.2 archive
0.1.1 Aug 23, 2013 Go to the documentation of dotless_i 0.1.1 Download dotless_i 0.1.1 archive
0.1.0 Aug 22, 2013 Go to the documentation of dotless_i 0.1.0 Download dotless_i 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
--
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
--
Learn more about scoring.

This package version is not analyzed, because it is more than two years old. Check the latest stable version for its analysis.