Questions tagged [concatenation]

Joining of two or more sequences into a single sequence.

Concatenation refers to the joining of two or more elements into a single element.

In programming, this can refer to

  • concatenation, which joins multiple strings into a single string
  • concatenation, where one or more arrays are combined (mostly appended) to make a new array
  • specific concatenation functions that combine elements along a specified dimension (horizontally, or vertically for example), replicate and tile existing elements, and so forth.
12037 questions
3
votes
1 answer

pipe result of cut to next argument and concat to string

I have something like: cut -d ' ' -f2 | xargs cat *VAR_HERE.ss where I want to use the result of cut as a variable and concat the output of cut between * and . so that cat will use the name to output the appropriate file. for example if the result…
brucezepplin
  • 9,202
  • 26
  • 76
  • 129
3
votes
1 answer

Concatenate and pull out data from cell array

I have a cell array called d_O3 of size 3x15. Here's what the first row looks like: 10x29 cell 31x29 cell 40x29 cell ... I want to turn column one inside each cell into a column array and vertically concatenate them all together.…
SugaKookie
  • 780
  • 2
  • 17
  • 41
3
votes
3 answers

Joining byte arrays using a separator in C#

I want something similar to String.Join(separator_string, list_of_strings) but for byte arrays. I need it because I am implementing a file format writer, and the specification says "Each annotation must be encoded as UTF-8 and separated by the…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
3
votes
1 answer

Is concatenation inside an ini file possible?

Is there any standard way to concatenate variables of an .ini-file? The .ini-file is parsed by PHP, so I know that it's possible to do it in PHP, but is it possible inside an .ini-file? Example for the file: ; definition of the server…
Honza
  • 939
  • 2
  • 11
  • 28
3
votes
3 answers

c++ from macros to templates

I'm trying to change some macros (we have a bunch of them) for function templates. Many times, I have the following scenario: #include void function_A( void ) { std::cout << "function A" << std::endl; } void function_B( void ) { …
Albert
  • 169
  • 2
  • 7
3
votes
1 answer

Concatenating Row Values in SSRS?

I'm trying to concatenate a particular record into one field to avoid multiple rows for the record. The issue is that a drive may contain multiple shifts in which each shift may be assigned a different vehicle. Screenshot below shows what is…
MISNole
  • 992
  • 1
  • 22
  • 48
3
votes
5 answers

char + String giving strange result

Question: Given a string, take the first 2 chars and return the string with the 2 chars added at both the front and back, so "kitten" yields"kikittenki". If the string length is less than 2, use whatever chars are there. front22("kitten") →…
3
votes
1 answer

How to get mysql Group_Concat to work with additional CONCAT information?

I'm working on a web app with mysql involving a user role table where permission levels are stored as well as role ids and associated to usernames and their ids (redundancy to continue supporting legacy code). I want to be able to display every…
BZohar
  • 33
  • 3
3
votes
4 answers

How do I concatenate strings in a while loop?

So I'm trying to make it so I can type multiples strings and it will concatenate all of them. But everytime it just returns one string and doesn't add them. def addWords(): s = 'a' while s != '': s = input( ' I will echo your input…
Eddie
  • 63
  • 2
  • 5
3
votes
0 answers

Value error when using SUM with a concatenate but works fine if manually type the exact same text

I am having a problem trying to use the SUM function with the inside of the function obtained using the concatenate function. I have been trying to get the result I am wanting by rewriting the function in as many different ways as I can think of. I…
3
votes
3 answers

MySQL select, concatenate with separator

My data looks like : id name age gender 1 abc M 'age' value is null. I want to concatenate column value with separator '\n' and if one column value is null, then also use '\n' to represent it. I tried concat_ws, but it only…
frank
  • 1,169
  • 18
  • 43
3
votes
1 answer

Encoding problems when concatenating with Powershell

Out of a bunch of files I want to concatenate all files whose filename starts with a 1 into a textfile named 1.txt. The encoding of the source files is UTF16-LE and this shall also be the encoding of the target file. But using my powershell script…
Largo
  • 487
  • 1
  • 5
  • 17
3
votes
1 answer

Grunt concat output ist empty

My concat Task Output is empty, I don't understand it. my Gruntfile: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ concat: { dist: { src: 'src/js/*.js', …
user4288073
3
votes
3 answers

Syntax Error in concat echo statement and html code

Please help me to understand syntax of concat following i want following code inside echo to understand concate 1-->
I try following code but getting syntax error that there is two echo.. 2-->…
Vishnu S. Divetia
  • 305
  • 1
  • 2
  • 10
3
votes
2 answers

Add a value to a list in Less CSS

Given the following: @list: 'banana', 'apple'; How would you add the value 'orange' to this list in LESS CSS? I have tried the following without success: @list+: 'orange'; @list: @list + 'orange'; @list: @list ~ 'orange';
mindfullsilence
  • 344
  • 9
  • 23
1 2 3
99
100