File: index.rb

package info (click to toggle)
ruby-unicode-blocks 1.9.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 140 kB
  • sloc: ruby: 90; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 318 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "zlib"
require_relative "constants"

module Unicode
  module Blocks
    blocks_data = []
    File.foreach('/usr/share/unicode/Blocks.txt') do |line|
      if line.match(/^([0-9A-F]+)..([0-9A-F]+); (.*)\n/)
        blocks_data.append [$1.hex, $2.hex, $3]
      end
    end
    INDEX = blocks_data.dup
  end
end