write a string operator
Answers
Answered by
0
sᴛʀɪɴɢ ᴏᴘᴇʀᴀᴛᴏʀs ¶
sᴛʀɪɴɢ ᴏᴘᴇʀᴀᴛᴏʀs ¶ ᴛʜᴇʀᴇ ᴀʀᴇ ᴛᴡᴏ sᴛʀɪɴɢ ᴏᴘᴇʀᴀᴛᴏʀs. ᴛʜᴇ ғɪʀsᴛ ɪs ᴛʜᴇ ᴄᴏɴᴄᴀᴛᴇɴᴀᴛɪᴏɴ ᴏᴘᴇʀᴀᴛᴏʀ ('. '), ᴡʜɪᴄʜ ʀᴇᴛᴜʀɴs ᴛʜᴇ ᴄᴏɴᴄᴀᴛᴇɴᴀᴛɪᴏɴ ᴏғ ɪᴛs ʀɪɢʜᴛ ᴀɴᴅ ʟᴇғᴛ ᴀʀɢᴜᴍᴇɴᴛs. ᴛʜᴇ sᴇᴄᴏɴᴅ ɪs ᴛʜᴇ ᴄᴏɴᴄᴀᴛᴇɴᴀᴛɪɴɢ ᴀssɪɢɴᴍᴇɴᴛ ᴏᴘᴇʀᴀᴛᴏʀ ('. ='), ᴡʜɪᴄʜ ᴀᴘᴘᴇɴᴅs ᴛʜᴇ ᴀʀɢᴜᴍᴇɴᴛ ᴏɴ ᴛʜᴇ ʀɪɢʜᴛ sɪᴅᴇ ᴛᴏ ᴛʜᴇ ᴀʀɢᴜᴍᴇɴᴛ ᴏɴ ᴛʜᴇ ʟᴇғᴛ sɪᴅᴇ.
_____________________________
Answered by
1
String Operators ¶
There are two string operators. The first is the concatenation operator ('. '), which returns the concatenation of its right and left arguments. The second is the concatenating assignment operator ('. ='), which appends the argument on the right side to the argument on the left side.
Similar questions