<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,9 @@
 # encoding: utf-8
 
+# Unichars is a proxy class for String. It's used by Unichars as a trimmed down version of ActiveSupport::Multibyte::Chars
+# when ActiveSupport isn't loaded.
+#
+#   Chars.new('Jo&#227;o') #=&gt; #&lt;Chars:0x34c240 @wrapped_string=&quot;Jo&#227;o&quot;&gt;
 class Chars
   attr_reader :wrapped_string
   alias to_s wrapped_string</diff>
      <filename>lib/chars.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,29 +9,65 @@ rescue NameError
   class Unichars &lt; Chars; end
 end
 
+# Unichars is a proxy class for String. It wraps a String and implements UTF-8 safe versions of various String operations.
+# Unimplemented methods are forwarded to the wrapped string.
+#
+# Unichars uses ActiveSupport::Multibyte::Chars as a superclass if it's loaded. Otherwise it will use it's own Chars class
+# which is basically a trimmed down version of ActiveSupport's Chars class.
+#
+#   require 'unichars'
+#   Unichars.superclass #=&gt; Chars
+#
+#   require 'active_support'
+#   require 'unichars'
+#   Unichars.superclass #=&gt; ActiveSupport::Multibyte::Chars
+#
+# Note that all the operations on strings are implemented using Glib2, so the outcome of the methods will be influenced by the
+# Glib2 version installed on your system.
 class Unichars
+  # Valid normalization forms
   NORMALIZATION_FORMS = [:c, :kc, :d, :kd]
   
   class &lt;&lt; self
     attr_accessor :default_normalization_form
   end
   
+  # Returns the length of the string expressed in codepoints.
+  #
+  #   Unichars.new('A ehm&#8230;, word.').size #=&gt; 13
   def size
     Glib.utf8_size(@wrapped_string)
   end
   
+  # Returns a Unichars instance with the string in capitals if they are are available for the supplied string.
+  #
+  #   Unichars.new('Slu&#223;').upcase.to_s #=&gt; SLUSS
   def upcase
     self.class.new(Glib.utf8_upcase(@wrapped_string))
   end
   
+  # Returns a Unichars instance with the string in lowercase characters if they are are available for the supplied string.
+  #
+  #   Unichars.new('ORGANIS&#201;E').downcase.to_s #=&gt; organis&#233;e
   def downcase
     self.class.new(Glib.utf8_downcase(@wrapped_string))
   end
   
+  # Returns a Unichars instance with the string in reverse order.
+  #
+  #   Unichars.new('Comment &#231;a va?').reverse.to_s #=&gt; av a&#231; tnemmoC
   def reverse
     self.class.new(Glib.utf8_reverse(@wrapped_string))
   end
   
+  # Returns a Unichars instance with the string in normalize form. See http://www.unicode.org/reports/tr15/tr15-29.html
+  # for more information about normalization.
+  #
+  # &lt;i&gt;form&lt;/i&gt; can be one of the following: &lt;tt&gt;:c&lt;/tt&gt;, &lt;tt&gt;:kc&lt;/tt&gt;, &lt;tt&gt;:d&lt;/tt&gt;, or &lt;tt&gt;:kd&lt;/tt&gt;.
+  #
+  #   decomposed = [101, 769].pack('U*')
+  #   composed = Unichars.new(decomposed).normalize(:kc)
+  #   composed.to_s.unpack('U*') #=&gt; [233]
   def normalize(form=Unichars.default_normalization_form)
     self.class.new(Glib.utf8_normalize(@wrapped_string, form))
   end</diff>
      <filename>lib/unichars.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require 'rubygems'
 
 Gem::Specification.new do |spec|
   spec.name = 'unichars'
-  spec.version = '0.3'
+  spec.version = '0.4'
   
   spec.author = &quot;Manfred Stienstra&quot;
   spec.email = &quot;manfred@fngtps.com&quot;</diff>
      <filename>unichars.gemspec</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>235823df9ee7d36ce158298d2f72688865595bea</id>
    </parent>
  </parents>
  <author>
    <name>Manfred Stienstra</name>
    <email>manfred@fngtps.com</email>
  </author>
  <url>http://github.com/Manfred/unichars/commit/ca2ac762e6664cc426bf2a07686b0db6b3de90c8</url>
  <id>ca2ac762e6664cc426bf2a07686b0db6b3de90c8</id>
  <committed-date>2008-12-31T06:38:39-08:00</committed-date>
  <authored-date>2008-12-31T06:38:39-08:00</authored-date>
  <message>Add documentation to the Unichars class and update the Chars documentation. Bump version to 0.4.</message>
  <tree>b02bdb797de9182d864679b4a7d7aa8adb8f80a5</tree>
  <committer>
    <name>Manfred Stienstra</name>
    <email>manfred@fngtps.com</email>
  </committer>
</commit>
