tagged [concatenation]
Which is faster: Union or Concat?
Which is faster: Union or Concat? Which is faster: `Union` or `Concat`? I don't care about the order of the elements. [Enumerable.Union Method](https://learn.microsoft.com/en-us/dotnet/api/system.linq...
- Modified
- 18 May at 13:41
C++ equivalent of StringBuffer/StringBuilder?
C++ equivalent of StringBuffer/StringBuilder? Is there a C++ Standard Template Library class that provides efficient string concatenation functionality, similar to C#'s [StringBuilder](http://msdn.mic...
- Modified
- 17 Mar at 14:20
How to concatenate two IEnumerable<T> into a new IEnumerable<T>?
How to concatenate two IEnumerable into a new IEnumerable? I have two instances of `IEnumerable` (with the same `T`). I want a new instance of `IEnumerable` which is the concatenation of both. Is ther...
- Modified
- 11 Mar at 00:23
How to concatenate two dictionaries to create a new one?
How to concatenate two dictionaries to create a new one? Say I have three dicts How do I create a new `d4` that combines these three dictionaries? i.e.:
- Modified
- 3 Mar at 04:30
Python strings and integer concatenation
Python strings and integer concatenation I want to create a string using an integer appended to it, in a loop. Like this: But it returns an error: > TypeError: unsupported operand type(s) for +: 'int'...
- Modified
- 3 Apr at 17:48
How to concatenate strings with padding in sqlite
How to concatenate strings with padding in sqlite I have three columns in an sqlite table: I need to select `Column1-Column2-Column3` (e.g. `A-01-0001`). I want to pad each column with a `-`.
- Modified
- 2 Mar at 09:43
Python - How to concatenate to a string in a for loop?
Python - How to concatenate to a string in a for loop? I need to "concatenate to a string in a for loop". To explain, I have this list: And inside a for loop I need to end with this: Can you give me a...
- Modified
- 23 Nov at 21:55
Create a comma-separated strings in C#
Create a comma-separated strings in C# I have an object which holds many values, and some of them (not all values from the object) need to be put in a [CSV](https://en.wikipedia.org/wiki/Comma-separat...
- Modified
- 11 Jun at 01:45
How to concatenate columns in a Postgres SELECT?
How to concatenate columns in a Postgres SELECT? I have two string columns `a` and `b` in a table `foo`. `select a, b from foo` returns values `a` and `b`. However, concatenation of `a` and `b` does n...
- Modified
- 28 Jun at 01:32
Comma separated string of selected values in MySQL
Comma separated string of selected values in MySQL I want to convert selected values into a comma separated string in MySQL. My initial code is as follows: Which produces: My desired output would look...
- Modified
- 7 Jun at 14:16
SQLite Update Syntax for string concatenation?
SQLite Update Syntax for string concatenation? I have a table with this data I am trying to pass the following statement to update the row so the description column is 'desc of apple' and 'desc of ora...
- Modified
- 20 Feb at 18:41
C# Compile-Time Concatenation For String Constants
C# Compile-Time Concatenation For String Constants Does C# do any compile-time optimization for constant string concatenation? If so, how must my code by written to take advantage of this? Example: Ho...
- Modified
- 19 Nov at 16:40
Memory usage of concatenating strings using interpolated vs "+" operator
Memory usage of concatenating strings using interpolated vs "+" operator I see the benefit of using interpolated strings, in terms of readability: over a concatenation done this way: The author of [th...
- Modified
- 28 Aug at 22:47
Concatenate a constant string to each item in a List<string> using LINQ
Concatenate a constant string to each item in a List using LINQ I am using C# and .Net 4.0. I have a `List` with some values, say x1, x2, x3. To each of the value in the `List`, I need to concatenate ...
- Modified
- 22 Oct at 07:3
How to split string preserving whole words?
How to split string preserving whole words? I need to split long sentence into parts preserving whole words. Each part should have given maximum number of characters (including space, dots etc.). For ...
- Modified
- 1 Mar at 23:49
Concatenate two NumPy arrays vertically
Concatenate two NumPy arrays vertically I tried the following: However, I'd expect at least that one result looks like this Why is it not concatenated vertically?
- Modified
- 6 Jan at 21:26
Concatenating two one-dimensional NumPy arrays
Concatenating two one-dimensional NumPy arrays How do I concatenate two one-dimensional arrays in [NumPy](http://en.wikipedia.org/wiki/NumPy)? I tried [numpy.concatenate](https://numpy.org/doc/stable/...
- Modified
- 30 Jul at 08:4
How do I concatenate strings and variables in PowerShell?
How do I concatenate strings and variables in PowerShell? Suppose I have the following snippet: I'd expect this snippet to show: > `42 - Slim Shady - Eminem` But instead it shows: > `42 + - + Slim Sha...
- Modified
- 27 Jun at 10:36
How to force a line break on a Javascript concatenated string?
How to force a line break on a Javascript concatenated string? I'm sending variables to a text box as a concatenated string so I can include multiple variables in on getElementById call. I've already ...
- Modified
- 12 Mar at 10:14
Most efficient way to concatenate strings in JavaScript?
Most efficient way to concatenate strings in JavaScript? In JavaScript, I have a loop that has many iterations, and in each iteration, I am creating a huge string with many `+=` operators. Is there a ...
- Modified
- 21 Apr at 18:41
Concatenate two Func delegates
Concatenate two Func delegates I have this Class: I declare below variables, too Is there any way that concatenate these variables(with AND/OR) and put the result in 3rd variable? for e
- Modified
- 5 Jul at 05:39
How to concatenate a fixed string and a variable in Python
How to concatenate a fixed string and a variable in Python I want to include a file name, 'main.txt', in the subject. For that I am passing a file name from the command line. But I get an error in doi...
- Modified
- 27 Mar at 16:45
is the + operator less performant than StringBuffer.append()
is the + operator less performant than StringBuffer.append() On my team, we usually do string concatentation like this: Obviously the following is much more readable: ``` var url = // some dynamically...
- Modified
- 1 Mar at 11:50
StringBuilder vs String concatenation in toString() in Java
StringBuilder vs String concatenation in toString() in Java Given the 2 `toString()` implementations below, which one is preferred: or ``` public String toString(){ StringBuilder sb = new StringBuil...
- Modified
- 9 Sep at 19:33
Oracle SQL, concatenate multiple columns + add text
Oracle SQL, concatenate multiple columns + add text So I basically wanna display this (whole row in ONE column): I like [type column] cake with [icing column] and a [fruit column]. The result should b...
- Modified
- 30 May at 07:41