I have a string foo: I want to append a character at the end of a string [ So the final output should be foo: [
I tried the following code.
puts 'foo: ' << '[' & puts 'foo: ' + '['
But both are appending the character in a new line & giving me the following output.
foo: [
However, I want to append the character in the same line & want the below output:
foo: [
Aucun commentaire:
Enregistrer un commentaire