【填空题】
A、3 B、4 C、2 D、1
A、字符串"helloworld"中不包含G字符,indexOf返回0 B、字符串"helloworld"中不包含G字符,indexOf返回null C、字符串"helloworld"中不包含G字符,indexOf返回-1 D、字符串"helloworld"中不包含G字符,indexOf返回1
A、RegExp 对象的 test()方法 B、RegExp 对象的 exec()方法 C、String 对象的 search()方法 D、String 对象的 match()方法
A、charAt函数的作用是返回一个字符,如charAt(1)返回字符串中的第一个字符 B、在length函数中,一个汉字占两个英文字母的空间,因此长度也要加倍 C、substring函数的作用是返回字符串的一个子串 D、String类和StringBuffer类都有length函数,它们的形式和功能是一致的 E、indexof函数的作用是从前往后搜索字符第一次出现的位置