Content text String Manipulation – Part 01.pdf
String Manipulation – Part 01 By A Karthigeyan
String Operators - + [Concatenation] • The + operator creates a new string by joining two operand strings. • For example: • „hot‟ + „spot‟ = „hotspot‟ • Note: • „James‟+ „007‟ = „James007‟ • „James‟ + 7 # Invalid
String Operators - * [Replication] • „*‟ operator performs multiplication and returns the product of two number operands. • For example: • “Run”*3 • RunRunRun • Note: • 3 * “Go” #Valid • “Go” * “3” # Invalid • “Go” * “Fast” #Invalid