Top "String-comparison" questions

string-comparison is the action of comparing strings, resulting in a boolean or an integer indicating the "distance" between the strings.

How can I compare strings in C using a `switch` statement?

In C there is a switch construct which enables one to execute different conditional branches of code based on an …

c string switch-statement string-comparison
How to compare the contents of two string objects in PowerShell

In PowerShell I have an array of string objects, and I have an object that contains string objects. In Java …

powershell string-comparison
String comparison in bash. [[: not found

I am trying to compare strings in bash. I already found an answer on how to do it on stackoverflow. …

bash shell ubuntu-11.04 string-comparison
Getting the closest string match

I need a way to compare multiple strings to a test string and return the string that closely resembles it: …

algorithm language-agnostic string-comparison levenshtein-distance
C++ Compare char array with string

I'm trying to compare a character array against a string like so: const char *var1 = " "; var1 = getenv("myEnvVar"); if(var1 == "…

c++ string string-comparison
Difference between InvariantCulture and Ordinal string comparison

When comparing two strings in c# for equality, what is the difference between InvariantCulture and Ordinal comparison?

c# .net string-comparison ordinal
Test if a string contains a word in PHP?

In SQL we have NOT LIKE %string% I need to do this in PHP. if ($string NOT LIKE %word%) { do …

php string-comparison
How do I compare version numbers in Python?

I am walking a directory that contains eggs to add those eggs to the sys.path. If there are two …

python version string-comparison
Similarity String Comparison in Java

I want to compare several strings to each other, and find the ones that are the most similar. I was …

java string-comparison