使用 %i 和 %I 符号数组文字 [英] Using %i and %I symbol array literal

查看:46
本文介绍了使用 %i 和 %I 符号数组文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通读 Rails 问题列表,我无法找到 %i 与符号数组相关的功能.这对任何人都有意义吗?

Reading through a list of Rails questions, I'm having trouble finding what the %i does in relation to a symbol array. Does this mean anything to anyone?

推荐答案

我无法找到与符号数组相关的 %i 做什么.

它是符号数组的数组字面量.它对符号数组的作用与 ' 对字符串的作用相同.

It is an array literal for an array of symbols. It does the same thing in relation to symbol arrays as ' does to strings.

这篇关于使用 %i 和 %I 符号数组文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆