This was an empty nodeshell. I'll do my best...

String concatenation is a method of combining two character strings to create a longer one. Different programming languages use different methods to concatenate strings. A brief summary of some of those methods:

C: The function strcat(char *, const char *) will append the second string to the first string. You will need to #include string.h. You can alternately use the function strncat to append only part of the second string. Consult your man pages for more information. You can run into problems if the memory allocated for the string to be appended gets overrun.

     Example:          strcat(temp, "appended string");

Visual Basic: Use the + operator to concatenate strings. You'll have to set the addition equal to something.

     Example:          String1 = Filebox.Text + ".TXT"

Perl: The concatenation operator "." is used to add strings together. You can use the .= assignment operator for concatenation as well.

     Example:          $var .= "and some more text.";

Python: Strings are added in Python using the + operator. There's no need to predeclare anything in Python, so don't worry about creating a string that's too large. You can also use the function string.join to combine strings, but you will need to import string.

     Example:          my_string = "my" + "string"

PL/SQL: You can use either the || operator or the concat function provided by PL/SQL to concatenate strings. || is by far the easiest and quickest method.

     Example:         i_tablename || "." || i_columnname

Java: The join method in the String class will perform all of your supernatural concatenation needs.

     Example:         String s1 = s2.join(" and some text.");

Log in or registerto write something here or to contact authors.