ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 6日 (木) 10:45:08 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-itrsmrks ------------------------- @@ -20,7 +20,7 @@ {{br}} -Sometimes you would like to refer to a position within a text buffer by means of index and offset, which in the early days of programming, before multi-byte characters were introduced, used to be the rather natural way to navigate the buffer. If you wish you can still navigate text buffer this way, though in the case you use UTF-8 character encoding, this can become increasingly unreliable. Should yo have a need to do so, you can employ Gtk::TextBuffer#get_iter_at_offset(char_offset), which gets the iter to a position char_offset chars from the start of the entire buffer, and Gtk::TextIter#offset which returns the character offset of an iterator. +Sometimes you would like to refer to a position within a text buffer by means of index and offset, which in the early days of programming, before multi-byte characters were introduced, used to be the rather natural way to navigate the buffer. If you wish you can still navigate text buffer this way, though in the case you use UTF-8 character encoding, this can become increasingly unreliable. Should you have a need to do so, you can employ Gtk::TextBuffer#get_iter_at_offset(char_offset), which gets the iter to a position char_offset chars from the start of the entire buffer, and Gtk::TextIter#offset which returns the character offset of an iterator. {{br}}