The ________________ method pads the string on left, that is, it inserts the padded characters at the beginning of string.

Thu Ha

New member
The ________________ method pads the string on left, that is, it inserts the padded characters at the beginning of string.
A. PadLeft
B. PadRight
C. PadFront
D. PadBegin
 
Answer: A
Explanation: The PadLeft method pads the string on the left, which means it inserts the padded characters at the beginning of the string; doing this right-aligns the characters within the string. The PadRight method, on the other hand, pads the string on the right, which means it inserts the padded characters at the end of the string and left-aligns the characters within the string.
 

Tìm kiếm

Back
Top