Questions tagged [string-concatenation]

String concatenation is the operation of joining two character strings end-to-end.

In particular in the theory of computation, the concatenation operation on strings is generalized to an operation on sets of strings as follows:

For two sets of strings S1 and S2, the concatenation S1S2 consists of all strings of the form vw where v is a string from S1 and w is a string from S2. In this definition, the string vw is the ordinary concatenation of strings v and w as defined in the introductory section. In this context, sets of strings are often referred to as formal languages.

Programming languages often provide operators (such as the + sign) to simplify concatenation of strings. For example, "s1" + "s2" would result in "s1s2".

2012 questions
0
votes
1 answer

Concatenate/append bitcoin address to image_tag source Rails

I have a hash that contains a bitcoin address. The hash looks like this: {"status"=>"success", "data"=>{"user_id"=>2, "address"=>"2NE9LK7LGKr9dStvxpF64ucKyoywnfcLd1W", "label"=>"slesle91", "available_balance"=>"0.00000000",…
Morez SA
  • 87
  • 7
0
votes
1 answer

How do I concatenate lines from a text file into one big string?

I have an input file that looks like(without such big spaces between lines): 3 4 ATCGA GACTTACA AACTGTA ATC ...and I need to concatenate all lines except for the first "3 4" line. Is there a simple solution? I've tried manipulating getline()…
Chief
  • 39
  • 9
0
votes
1 answer

Script to create an insert SQL

I'm trying to create a script that concatenate various values that in the end it creates a insert script,i'm already made one. INSERT INTO #SCRPTS SELECT getdate(), 'INSERT WKF_TpProcesso VALUES (''' + Des_TpProcesso + ''',' + cast(Cod_Func as…
Vinicius Cano
  • 199
  • 1
  • 3
  • 18
0
votes
1 answer

Adding text from mySQL table to Middle of URL in PHP page

I'll try to ask this correctly. This has got me licked. I have a script online that will bring up items according to a search on let's say, page1.php. The results come from a table called items. The results list has links to the items that look like…
Fisherman
  • 21
  • 1
  • 5
0
votes
2 answers

String concatenation of n strings to a single string

How to Concatenate the given n strings to make a single string such that on combining two strings the last character of first string should be same as the first character of next string. For example: Input: ab2c,h23f2,c4dsh Output:…
Abhishek N
  • 57
  • 1
  • 8
0
votes
1 answer

Why does a variable in += operation with concatenation yield mixed results based on how it's defined?

When I declare the variable and in the next statement assign values via plus equals (+=) operator by concatenating other variables and text, I receive all data stored in my object. However, it is preceded by 'undefined'. In an effort to remove the…
0
votes
1 answer

Add prefix text to select statement

I am trying to run a select statement on two different servers that have some matching primary keys. I want to be able to select the primary key but add the prefix 'A' to every record ex: ID "to this" ID 1 A1 2 …
user2168066
  • 627
  • 11
  • 21
0
votes
1 answer

Powershell: String is added more than once to another string

In a script that builds a blob of text, there is a point where a block of "summary" text can be prepended to said blob. Although the script only generates the summary text once, it gets prepended to the text blob multiple times. This is the…
0
votes
2 answers

How to concatenate strings in a for-loop?

I'm using a loop in C and trying to determine how fprintf works. fprintf(out, "%02X", (int)(ch & 0x00FF); This statement prints out a single hex value char for every iteration of the loop. Can I store this in a variable or char array? How can I…
Ke.
  • 2,484
  • 8
  • 40
  • 78
0
votes
1 answer

Ways of concatenating string in a prepared statement

I have a web application that needs to be stored its data on specific tables depending on the user's input. e.g. if a user input Code "A" their data will be saved to DatabaseA, while if a user input Code "B", the data will be saved to DatabaseB. I…
ZZZZZZZZZ
  • 197
  • 2
  • 10
0
votes
1 answer

Can Python or SQLite search and replace output on the fly?

Programs: SQLite database 3.14.1 & Python 2.7 I have a table called transactions. The field "name" has names in it. I can use Python to return the rows from selected fields to a text file based on criteria specified from tranType while adding…
Arkham Angel
  • 309
  • 1
  • 5
  • 18
0
votes
2 answers

How to concatenate string with quotes and parentheses in R

I'm trying to concatenate two strings. The first string should look like the following: a <- paste("//*/a[@href = 'abcd1234.cfmcyc_dt=",eopm, "&orig_id=1234']",sep="") > a [1] "//*/a[@href = 'abcd1234.cfmcyc_dt=20160731&orig_id=1234']" Then I…
d84_n1nj4
  • 1,712
  • 6
  • 23
  • 40
0
votes
4 answers

Concatenate multiple object property values into one

If I have object with following structure: var test = { property1: "value1", property2: "value2", property3: "value3", property4: "value4", property5: "value5" } Assuming that property names are fixed and not always in this…
Nikola B.
  • 556
  • 2
  • 8
  • 23
0
votes
2 answers

String concatenation in Dynamic SQL using PIVOT table

I have to work on a mapping from an ERP system to a MySQL database. The structure that is present in the ERP system is: _____________________________________ | Article | Feature | Criterion | |---------|---------------|-----------| | Art1 …
slexo
  • 5
  • 3
0
votes
1 answer

Why am I getting an InvalidCastException here?

I'm trying to write code to print out "Row (0 to 3): ". Here's my code: ReadOnly gridSize As Integer = 4 Dim s1 As String s1 = "Row (0 to " & (gridSize - 1) & "): " WriteLine(s1) I'm getting an InvalidCastException with the following error at the…
Voyna
  • 33
  • 6
1 2 3
99
100