从字符串“hello-world”中获取world,以下哪个方法正确
A: substr("hello-world",6);
B: substr("hello-world",6,5);
C: substr("hello-world",-5,5);
D: substr("hello-world",-5);
A: substr("hello-world",6);
B: substr("hello-world",6,5);
C: substr("hello-world",-5,5);
D: substr("hello-world",-5);
举一反三
- 该语句echo substr("Hello world",10)."<br>";打印结果为______(1)_______,该语句echo substr("Hello world",-10)."<br>";打印结果为______(2)_______,该语句echo substr("Hello world",-10,-2)."<br>";打印结果为____(3)________,
- 若字符串 s = 'hello world',则语句 s.ljust(15, '.') 和 s.rjust(15) 的输出结果为? A: '....hello world'' hello world' B: 'hello world....'' hello world' C: 'hello world....''hello world ' D: 'hello world....''hello world'
- 下面代码的运行结果是( )。var str= "hello world" ;var str1=str.toUpperCase();var str2=str.toLowerCase() ;alert (str1) ;alert (str2) ; A: "HELLO WORLD","HELLO WORLD" B: "HELLO WORLD","hello world" C: "hello worl","HELLO WORLD" D: "hello world","hello world"
- 如何使用 PHP 输出 "hello world"?( ) A: "Hello World"; B: echo "Hello World"; C: Document.Write("Hello World"); D: console.log("Hello World");
- 在屏幕上打印输出“Hello World”,以下选项中正确的是( ) A: print(Hello World) B: print('Hello World') C: printf("Hello World") D: printf('Hello World')