るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.015秒)

別のキーワード

  1. io/console getch
  2. io getch
  3. strscan getch
  4. stringscanner getch
  5. getch io

ライブラリ

クラス

検索結果

StringScanner#getch -> String | nil (18125.0)

一文字スキャンして文字列で返します。 スキャンポインタをその後ろに進めます。 スキャンポインタが文字列の末尾を指すならnilを返します。

...//emlist[例][ruby]{
require 'strscan'

utf8 = "\u{308B 3073 3044}"
s = StringScanner.new(utf8.encode("UTF-8"))
p s.getch # => "る"
p s.getch # => "び"
p s.getch # => "い"
p s.getch # => nil
//}...

IO#getch -> String (18101.0)

raw モードで一文字読み込んだ結果を返します。

raw モードで一文字読み込んだ結果を返します。

NEWS for Ruby 2.0.0 (6.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...s the terminal to cooked mode within the given block.
* 追加: IO#cooked! which sets the terminal to cooked.
* 拡張: IO#raw, IO#raw!, IO#getch キーワード引数 :min, :time を受け付けます。

* io/wait
* 追加: IO#wait_writable
* 追加: IO#wait_readable は IO#wait...