greek_string_utils 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.rdoc +14 -3
- data/lib/greek_string_utils.rb +1 -2
- data/lib/greek_string_utils/version.rb +1 -1
- metadata +5 -5
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -2,9 +2,14 @@
|
|
2
2
|
|
3
3
|
== Description
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
This module simply provides some methods to handle issues with greek letters
|
6
|
+
|
7
|
+
1. upperfix: In general greek strings dont preserve accents when upcase.
|
8
|
+
2. remove_accents: Simply removes all accents
|
9
|
+
3. greek_sort: Simply sorts correctly greek letters
|
10
|
+
|
11
|
+
For other cases (capitalize, downcase etc) +unicode+, +mb_chars+ etc are doing
|
12
|
+
their job very well.
|
8
13
|
|
9
14
|
== Install
|
10
15
|
|
@@ -18,6 +23,12 @@ gem install 'greek_string_utils'
|
|
18
23
|
a = 'το 2012 η ελλάδα θα είναι δεύτερη σε ύφεση στον κόσμο'
|
19
24
|
upperfix(a) # => 'ΤΟ 2012 Η ΕΛΛΑΔΑ ΘΑ ΕΙΝΑΙ ΔΕΥΤΕΡΗ ΣΕ ΥΦΕΣΗ ΣΤΟΝ ΚΟΣΜΟ'
|
20
25
|
|
26
|
+
a = %w(αβ άβ άα αα)
|
27
|
+
greek_sort(a) # => %w(άα αα άβ αβ)
|
28
|
+
|
29
|
+
a = 'κρύο'
|
30
|
+
remove_accents(a) # => 'κρυο'
|
31
|
+
|
21
32
|
if you want to use it in a rails app:
|
22
33
|
|
23
34
|
gem 'greek_string_utils'
|
data/lib/greek_string_utils.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: greek_string_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Simple library to correct upcase in greek
|
15
15
|
email:
|
@@ -44,7 +44,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
44
44
|
version: '0'
|
45
45
|
segments:
|
46
46
|
- 0
|
47
|
-
hash:
|
47
|
+
hash: -178008917700154382
|
48
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
@@ -53,10 +53,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
segments:
|
55
55
|
- 0
|
56
|
-
hash:
|
56
|
+
hash: -178008917700154382
|
57
57
|
requirements: []
|
58
58
|
rubyforge_project:
|
59
|
-
rubygems_version: 1.8.
|
59
|
+
rubygems_version: 1.8.10
|
60
60
|
signing_key:
|
61
61
|
specification_version: 3
|
62
62
|
summary: Simple library to correct upcase in greek
|