string length
常见例句
- string-length("Brett") obviously returns 5, and normalize-space(" Brett McLaughlin ") returns "Brett McLaughlin".
string-length("Brett") 显然返回 5,normalize-space(" Brett McLaughlin ") 则返回 "Brett McLaughlin"。 - One improvement might be to generate a blind table for short paragraphs only (you can evaluate the length of a paragraph with the string-length() function).
改进方法之一可能是只对短的段生成隐形表(可以用 string-length() 函数计算段的长度)。 - Rules for unnamed nodes are allowed but not often used (for example, *[string-length(.) > 10], which matches any element with more than 10 characters of text content).
允许使用未命名节点的规则,但这些规则并不常用(例如, *[string-length(.) > 10] ,它匹配任何文本内容多于 10 个字符的元素)。 - - And because I'm writing out a string that's the same length -- -- my strings aren't getting shorter -- it's creating this illusion of some animation.
因为我写了一个长度相同的字符串-,我的字符串不会变的更短-,它生成一个动画幻觉。
哈佛公开课 - 计算机科学课程节选 - I certainly don't want to assume they're always going to type a three-letter or a four-letter or a two-letter word I want some dynamism but that's fine because get string can get a string of any length, I can then use the string length function to just ask while the program is running how big is the string that I was handed?
当然我不能假设他总是,输入3个字符或4个字符,或2个字符的单词,我想要动态地分配,因为GetString可以获得任意长度的字符串,然后我可以使用strlen函数,来得到那个我传递的字符串,有多长?
哈佛公开课 - 计算机科学课程节选 返回 string length