No commit activity in last 3 years
No release in over 3 years
Simple library to correct upcase in greek
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

GreekStringUtils

Note

This project is a subset of a larger private repo. I hope that it will become public soon.

Description

This module simply provides some methods to handle issues with greek letters

  1. upperfix: In general greek strings dont preserve accents when upcase.
  2. remove_accents: Simply removes all accents
  3. greek_sort: Simply sorts correctly greek letters

For other cases (capitalize, downcase etc) +unicode+, +mb_chars+ etc are doing their job very well.

Install

  gem install 'greek_string_utils'

Usage

  require 'greek_string_utils'
  include GreekStringUtils

  a = 'το 2012 η ελλάδα θα είναι δεύτερη σε ύφεση στον κόσμο'
  upperfix(a) # => 'ΤΟ 2012 Η ΕΛΛΑΔΑ ΘΑ ΕΙΝΑΙ ΔΕΥΤΕΡΗ ΣΕ ΥΦΕΣΗ ΣΤΟΝ ΚΟΣΜΟ'

  a = %w(αβ άβ άα αα)
  greek_sort(a) # => %w(άα αα άβ αβ)

  a = 'κρύο'
  remove_accents(a) # => 'κρυο'

if you want to use it in a rails app:

  gem 'greek_string_utils'

And normally in application_helper.rb:

  include GreekStringUtils

Credits

Eric Cohen https://github.com/eirc

License

greek_string_utils is released under the MIT License