Multiple choice technology

What is the returned value for the following expression : string_pad("friend", 7 ,"s")

  1. "sfriend"

  2. "sssssssfriend"

  3. "friends"

  4. "friendsssssss"

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

string_pad pads to the specified length. 'friend' has 6 characters, padding to length 7 with 's' adds one 's' at the end, making 'friends'. The pad character is added after the original string.