本文簡要介紹ruby語言中 IRB::OutputMethod.parse_printf_format
的用法。
用法
parse_printf_format(format, opts)
如果在來自 printf
的給定 format
中存在成功的 Regexp
匹配,則返回給定 format
和 opts
的數組以供 Kernel#sprintf
使用
% <flag> [#0- +] <minimum field width> (\*|\*[1-9][0-9]*\$|[1-9][0-9]*) <precision>.(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)? #<length modifier>(hh|h|l|ll|L|q|j|z|t) <conversion specifier>[diouxXeEfgGcsb%]
相關用法
- Ruby Object.instance_variable_get用法及代碼示例
- Ruby Open3.capture3用法及代碼示例
- Ruby Open3.capture2用法及代碼示例
- Ruby OpenStruct.ostruct[name] =用法及代碼示例
- Ruby Option.level用法及代碼示例
- Ruby OpenSSL.fips_mode =用法及代碼示例
- Ruby Object.display用法及代碼示例
- Ruby Object.remove_instance_variable用法及代碼示例
- Ruby Option.byte用法及代碼示例
- Ruby Object.define_singleton_method用法及代碼示例
- Ruby ObjectSpace.memsize_of_all用法及代碼示例
- Ruby Object.methods用法及代碼示例
- Ruby Object.public_send用法及代碼示例
- Ruby ObjectSpace模塊用法及代碼示例
- Ruby Object.xmp用法及代碼示例
- Ruby OpenSSL模塊用法及代碼示例
- Ruby Open3.capture2e用法及代碼示例
- Ruby Object.singleton_methods用法及代碼示例
- Ruby Option.family用法及代碼示例
- Ruby OCSP模塊用法及代碼示例
- Ruby Object.enum_for用法及代碼示例
- Ruby ObjectSpace.count_symbols用法及代碼示例
- Ruby Open3.popen2e用法及代碼示例
- Ruby ObjectSpace.define_finalizer用法及代碼示例
- Ruby ObjectSpace.count_imemo_objects用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 OutputMethod.parse_printf_format。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。