tagged [string]
Check whether a string contains a substring
Check whether a string contains a substring How can I check whether a given string contains a certain substring, using Perl? More specifically, I want to see whether `s1.domain.example` is present in ...
- Modified
- 21 Jun at 19:58
Is it possible to have placeholders in strings.xml for runtime values?
Is it possible to have placeholders in strings.xml for runtime values? Is it possible to have placeholders in string values in `string.xml` that can be assigned values at run time? Example: > some str...
- Modified
- 10 Feb at 20:55
How to separate full name string into firstname and lastname string?
How to separate full name string into firstname and lastname string? I need some help with this, I have a fullname string and what I need to do is separate and use this fullname string as firstname an...
- Modified
- 9 Jul at 18:43
How do I interpolate strings?
How do I interpolate strings? I want to do the following in C# (coming from a Python background): How do I replace the token inside the string with the value outside of it?
- Modified
- 12 May at 15:25
golang convert "type []string" to string
golang convert "type []string" to string I see some people create a `for` loop and run through the slice as to create a string, is there an easier way to convert a `[]string` to a `string`? Will `spri...
- Modified
- 25 Sep at 10:5
String.Format("{0:C2}", -1234) (Currency format) treats negative numbers as positive
String.Format("{0:C2}", -1234) (Currency format) treats negative numbers as positive I am using `String.Format("{0:C2}", -1234)` to format numbers. It always formats the amount to a positive number, w...
- Modified
- 30 Dec at 22:43
How do I check if a string contains a specific word?
How do I check if a string contains a specific word? Consider: Suppose I have the code above, what is the correct way to write the statement `if ($a contains 'are')`?
- Modified
- 1 May at 10:30
String Interpolation vs String.Format
String Interpolation vs String.Format Is there a noticeable performance difference between using string interpolation: vs String.Format()? I am only asking because ReSharper is prompting the fix, and ...
- Modified
- 3 Feb at 01:26
Why use String.Format?
Why use String.Format? Why would anyone use `String.Format` in C# and VB .NET as opposed to the concatenation operators (`&` in VB, and `+` in C#)? What is the main difference? Why are everyone so int...
- Modified
- 12 Jul at 10:42
take the last n lines of a string c#
take the last n lines of a string c# I have a string of unknown length it is in the format with out know how long it is how can i just take the last 10 lines of the string a line being separated by "\...
- Modified
- 16 Aug at 06:35