tagged [string-concatenation]

Which is the preferred way to concatenate a string in Python?

Which is the preferred way to concatenate a string in Python? Since Python's `string` can't be changed, I was wondering how to concatenate a string more efficiently? I can write like it: or like this:...

Getting unicode string from its code - C#

Getting unicode string from its code - C# I know following is the way to use unicode in C# In my situation, I will not get the character code () at compile time. I get this from a XML file at runtime....

15 Jun at 04:20

Is it better practice to use String.format over string Concatenation in Java?

Is it better practice to use String.format over string Concatenation in Java? Is there a perceptible difference between using `String.format` and String concatenation in Java? I tend to use `String.fo...

SQL Server String Concatenation with Null

SQL Server String Concatenation with Null I am creating a computed column across fields of which some are potentially null. The problem is that if any of those fields is null, the entire computed colu...

Android TextView : "Do not concatenate text displayed with setText"

Android TextView : "Do not concatenate text displayed with setText" I am setting text using by following way. In that one is simple use and one is setting text with formatting text. An

How should I concatenate strings?

How should I concatenate strings? Are there differences between these examples? Which should I use in which case? ``` var str1 = "abc" + dynamicString + dynamicString2; var str2 = String.Format("abc{0...

23 May at 12:32

C# FormattableString concatenation for multiline interpolation

C# FormattableString concatenation for multiline interpolation In C#7, I'm trying to use a multiline interpolated string for use with [FormttableString.Invariant](https://learn.microsoft.com/en-us/dot...

When should I use String.Format or String.Concat instead of the concatenation operator?

When should I use String.Format or String.Concat instead of the concatenation operator? In C# it is possible to concatenate strings in several different ways: Using the concatenation operator: Using `...

12 Jan at 11:46

Why is StringBuilder slower than string concatenation?

Why is StringBuilder slower than string concatenation? Why is `StringBuilder` slower when compared to + concatenation? `StringBuilder` was meant to avoid extra object creation, but why does it penaliz...

String concatenation with Groovy

String concatenation with Groovy What is the best (idiomatic) way to concatenate Strings in Groovy? Option 1: Option 2: I've founded an interesting point about this topic i

SQL NVARCHAR and VARCHAR Limits

SQL NVARCHAR and VARCHAR Limits All, I have a large (unavoidable) dynamic SQL query. Due to the number of fields in the selection criteria the string containing the dynamic SQL is growing over 4000 ch...

How to create a SQL Server function to "join" multiple rows from a subquery into a single delimited field?

How to create a SQL Server function to "join" multiple rows from a subquery into a single delimited field? To illustrate, assume that I have two tables as follows:

2 Apr at 11:34

String.Join performance issue in C#

String.Join performance issue in C# I've been researching a question that was presented to me: How to write a function that takes a string as input and returns a string with spaces between the charact...

16 Sep at 22:35