What is the return type of the substr() function?

Lâm Phung

New member
What is the return type of the substr() function?
A. int
B. long
C. byte
D. string
 
Answer: D
Explanation: The substr() function is used to return a portion of a given string. It accepts 2 inputs as arguments; the lower and upper indexes. It can be used as “str.substr(a,b);” where a is the lower index and b is the upper index.
 

Tìm kiếm

Back
Top