Questions tagged [stringcomparer]
25 questions
0
votes
1 answer
Group list of strings by most common case variant
I have a function that is given a list of strings from a database to display as options in a select filter.
It handles case variants with StringComparer.InvariantCultureIgnoreCase.
public static List GetMostCommonItems(List values)
…

Mitch Jones
- 25
- 3
0
votes
0 answers
IQueryable cannot translate numeric string comparer
I'm trying to sort the data by the type "V0003", "4323Fw" but an error occurs with comparer, what is going wrong and how can I sort in IQueryable?
My comparer:
public class NumericStringComparer : IComparer
{
public int…

DevLife
- 519
- 1
- 4
- 6
0
votes
1 answer
Sort a column by given order in Syncfusion Essential JS 2 Grid for Angular 5
Sorting feature is described under the documentation for syncfusion-ej2 Grid (https://ej2.syncfusion.com/angular/documentation/grid/api-column.html#sortcomparer). I have already implemented it in my Angular application. Still, I couldn't find a way…

Kushan Randima
- 2,174
- 5
- 31
- 58
0
votes
1 answer
Compare two text files and show what is the SAME
I am needing help on comparing two files. I am able to print out what the difference is between the two, but I am not able to figure out how to print what is the SAME between the two when they are wrong. Can anyone assist me? Thanks in advance!
…

I'm just a coder for fun
- 151
- 3
- 19
0
votes
1 answer
Using custom comparer for strings
I have following list:
var ips = new List {
"192.168.5.1",
"192.168.0.2",
"192.168.0.3",
"192.168.0.4",
"192.168.1.1",
"192.168.1.2",
"192.168.1.3",
"192.168.1.4"
}.OrderBy(p => p.Ip);
It looks like it works,…

newbie
- 273
- 2
- 4
- 13
0
votes
1 answer
Error at Watin.Core.Comparer StringComparer class
I am using Watin system in my program.
I get the following error:
ArgumentNullException at Watin.Core.Comparer
StringComparer(string comparisonValue, bool ignoreCase)
Error : Value Cannot be Null(comparisonValue)
But I have no idea that who and…

Phillip
- 1
- 2
-1
votes
2 answers
How to compare string in javascript boolean function?
I have to write a unit test for a JavaScript function to compare two phone numbers. This is a function whose input parameters are two strings and the return type is true / false. True if the phone numbers are the same, false if they are not. As many…

kerpi
- 1
- 1
-1
votes
5 answers
How to compare text
Like the title, How to compare text?. For a example, go to textdiff.com.

cdxf
- 5,501
- 11
- 50
- 65
-2
votes
1 answer
Any reference that confirms that Array.Sort(charArray, StringComparer.Ordinal) works?
I would like to sort an array of chars according to their ordinal positions (code points) in Unicode table.
I see that the following code works:
char[] charArray = new[] { 'h', 'e', 'l', 'l', 'o' };
Array.Sort(charArray,…

mk33
- 351
- 1
- 2
- 6
-2
votes
3 answers
How to compare two strings for accuracy
I'm making this useless program just to get back into programming properly and I'm struggling with comparing two strings for accuracy.
I basically have 2 strings: (example)
(Constant that im comparing to) str1 = "abcdefghijkl"
(Input) str2 =…

Rinslep
- 65
- 10