16
有没有更好的方法来检查Ruby中字符串的Nil或Length == 0?
有没有比以下更好的方法来检查字符串是否为nil或在Ruby中长度为0? if !my_string || my_string.length == 0 return true else return false end 在C#中很方便 string.IsNullOrEmpty(myString) 有什么和Ruby类似的东西吗?
169
ruby