Method: Filex::Filex.colon_space
- Defined in:
- lib/filex.rb
.colon_space(str) ⇒ Array<String>
最初に現れる「:」と空白文字の組み合わせを区切り文字列として、文字列を2つに分割する
| 175 176 177 178 179 180 181 182 | # File 'lib/filex.rb', line 175 def self.colon_space(str) if (m = /^(\s*([^\s]+):\s)(.*)$/.match(str)) left = m[1] right = m[3] end [left, right] end |