tagged [string]
Good Python modules for fuzzy string comparison?
Good Python modules for fuzzy string comparison? I'm looking for a Python module that can do simple fuzzy string comparisons. Specifically, I'd like a percentage of how similar the strings are. I know...
- Modified
- 25 Mar at 16:25
Which of one from string interpolation and string.format is better in performance?
Which of one from string interpolation and string.format is better in performance? Consider this code: Which of one from string interpolation and `string.Format` is better in performance? Also what ar...
- Modified
- 4 Oct at 17:41
Regular Expression Match to test for a valid year
Regular Expression Match to test for a valid year Given a value I want to validate it to check if it is a valid year. My criteria is simple where the value should be an integer with `4` characters. I ...
- Modified
- 25 Feb at 13:17
Join list of string to comma separated and enclosed in single quotes
Join list of string to comma separated and enclosed in single quotes now the s is `'test's','test','test's more'` but I need to replace the inner quotes with 2 single quotes like this: `'test''s','tes...
- Modified
- 4 Aug at 00:3
Can maximum number of characters be defined in C# format strings like in C printf?
Can maximum number of characters be defined in C# format strings like in C printf? Didn't find how to do that. What I found was more or less on the lines of this ([http://blog.stevex.net/string-format...
- Modified
- 2 Mar at 00:28
Using Python String Formatting with Lists
Using Python String Formatting with Lists I construct a string `s` in Python 2.6.5 which will have a varying number of `%s` tokens, which match the number of entries in list `x`. I need to write out a...
- Modified
- 27 Sep at 11:51
Smart string comparison
Smart string comparison I am looking for a library/class that allows smart compare of two strings. At best it would give as a result percent of how two strings are alike. I am comparing company names,...
- Modified
- 23 May at 11:56
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...
- Modified
- 18 Apr at 10:18
Format a Go string without printing?
Format a Go string without printing? Is there a simple way to format a string in Go without printing the string? I can do: But I want the formatted string returned rather than printed so I can manipul...
- Modified
- 21 May at 13:58
How to compare Unicode characters that "look alike"?
How to compare Unicode characters that "look alike"? I fall into a surprising issue. I loaded a text file in my application and I have some logic which compares the value having µ. And I realized that...
- Modified
- 21 Dec at 13:22
String.Equals vs String.Compare vs "==" in Action. Explanation needed
String.Equals vs String.Compare vs "==" in Action. Explanation needed Following is the code snippet from a console application - ``` class MyClass { public int GetDay(string data22) { int r...
- Modified
- 6 Mar at 21:42
How to find the length of a string in R
How to find the length of a string in R How to find the length of a string (i.e., number of characters in a string) without splitting it in R? I know how to find the length of a list but not of a stri...
- Modified
- 5 Jan at 21:26
In C#, what is the best way to compare strings with null and "" return true
In C#, what is the best way to compare strings with null and "" return true I have the following code (as i am trying to detect changes to a field) the issue is I am having cases where person.State is...
- Modified
- 16 Aug at 21:21
Using an array as argument for string.Format()
Using an array as argument for string.Format() When trying to use an array as an argument for the `string.Format()` method, I get the following error: > FormatException: Index (zero based) must be gre...
- Modified
- 30 Nov at 11:0
Removing numbers from string
Removing numbers from string How can I remove digits from a string?
How to get a null terminated string from a C# string?
How to get a null terminated string from a C# string? - -
- Modified
- 6 Jul at 19:35
Caselessly comparing strings in C#
Caselessly comparing strings in C# Let's say I have two strings: a and b. To compare whether a and be have the same values when case is ignored, I've always used: However, using Reflector, I've seen t...
- Modified
- 14 Apr at 14:43
Clear array of strings
Clear array of strings What is the easiest way to clear an array of strings?
How to convert a String to CharSequence?
How to convert a String to CharSequence? How to convert `String` to `CharSequence` in Java?
- Modified
- 29 Jun at 13:12
Capitalize words in string
Capitalize words in string What is the best approach to capitalize words in a string?
- Modified
- 30 Oct at 10:42
Using == or Equals for string comparison
Using == or Equals for string comparison In some languages (e.g. C++) you can't use operators like == for string comparisons as that would compare the address of the string object, and not the string ...
- Modified
- 28 Dec at 10:10
How to convert String object to Boolean Object?
How to convert String object to Boolean Object? How to convert `String` object to `Boolean` object?
How to change string into QString?
How to change string into QString? What is the most basic way to do it?
Remove final character from string
Remove final character from string How do I remove the last character from a string?
Most efficient way to concatenate strings?
Most efficient way to concatenate strings? What's the most efficient way to concatenate strings?
- Modified
- 15 Aug at 00:1
Python string class like StringBuilder in C#?
Python string class like StringBuilder in C#? Is there some string class in Python like `StringBuilder` in C#?
Curly braces in string in PHP
Curly braces in string in PHP What is the meaning of `{ }` (curly braces) in string literals in PHP?
Convert int to string?
Convert int to string? How can I convert an `int` datatype into a `string` datatype in C#?
How can I exclude one word with grep?
How can I exclude one word with grep? I need something like:
How to convert list to string
How to convert list to string How can I convert a list to a string using Python?
Get first 250 words of a string?
Get first 250 words of a string? How do I get the first 250 words of a string?
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...
- Modified
- 23 May at 12:32
Replace Line Breaks in a String C#
Replace Line Breaks in a String C# How can I replace Line Breaks within a string in C#?
Trim string in JavaScript
Trim string in JavaScript How do I remove all whitespace from the start and end of the string?
- Modified
- 13 Jun at 01:47
Does VBScript have a substring() function?
Does VBScript have a substring() function? Is there a `substring()` function in VBScript similar to Java's `string.substring()`?
Why does the string type have a .ToString() method?
Why does the string type have a .ToString() method? Why does the string data type have a `.ToString()` method?
String, StringBuffer, and StringBuilder
String, StringBuffer, and StringBuilder Please tell me a real time situation to compare `String`, `StringBuffer`, and `StringBuilder`?
- Modified
- 27 Aug at 17:3
How to get ° character in a string in python?
How to get ° character in a string in python? How can I get a `°` (degree) character into a string?
Remove characters from a string
Remove characters from a string What are the different ways I can remove characters from a string in JavaScript?
- Modified
- 21 Oct at 18:1
Java Equivalent to .NET's String.Format
Java Equivalent to .NET's String.Format Is there an equivalent to .NET's `String.Format` in Java?
Extract substring from a string
Extract substring from a string what is the best way to extract a substring from a string in android?
Why does String.Format convert a forward slash into a minus sign?
Why does String.Format convert a forward slash into a minus sign? Why does `String.Format("/")` get converted to "-"?
- Modified
- 16 Aug at 13:55
How to sort a list of strings?
How to sort a list of strings? What is the best way of creating an alphabetically sorted list in Python?
C++ Remove new line from multiline string
C++ Remove new line from multiline string Whats the most efficient way of removing a 'newline' from a std::string?
Concat strings in a shell script
Concat strings in a shell script How can I concat strings in shell? Is it just... ?
- Modified
- 24 Jul at 17:21
Escaping arguments for string.Format in a C# multiline verbatim string
Escaping arguments for string.Format in a C# multiline verbatim string When I format it as a usual string with string.Format, naturally i get an exception that the input string was not in correct form...
- Modified
- 8 Oct at 19:31
How to use verbatim strings with interpolation?
How to use verbatim strings with interpolation? In C# 6 there is a new feature: interpolated strings. These let you put expressions directly into code. Rather than relying on indexes: the above become...
- Modified
- 10 Nov at 17:51
How do I turn a String into a InputStreamReader in java?
How do I turn a String into a InputStreamReader in java? How can I transform a `String` value into an `InputStreamReader`?
tabbing in C# resource file
tabbing in C# resource file How do i add a TAB (\t) to a string resource ? "\tText" doesn't work
- Modified
- 25 May at 15:43