Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你能告诉我为什么这两行都打印出来a吗? trace(substring("asd", 0, 1)); // == "a" trace(substring("asd", 1, 1)); // == "a" (这打印出来s:) trace(substring("asd", 2, 1)); // == "s"
a
trace(substring("asd", 0, 1)); // == "a"
trace(substring("asd", 1, 1)); // == "a"
s
trace(substring("asd", 2, 1)); // == "s"
Flash Lite 1.x 中的索引是否以 1 开头?
摘自 http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary701.html
可用性 Flash Player 4。此函数已被弃用,取而代之的是 String.substr 。 描述 字符串函数;提取字符串的一部分。这个函数是从 1 开始的, 而 String 对象方法是从 0 开始的。