mirror of
				https://github.com/Kareadita/Kavita.git
				synced 2025-10-31 10:37:04 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			325 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			325 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Collections;
 | |
| 
 | |
| namespace API.Comparators;
 | |
| 
 | |
| #nullable enable
 | |
| 
 | |
| public class NumericComparer : IComparer
 | |
| {
 | |
| 
 | |
|     public int Compare(object? x, object? y)
 | |
|     {
 | |
|         if((x is string xs) && (y is string ys))
 | |
|         {
 | |
|             return StringLogicalComparer.Compare(xs, ys);
 | |
|         }
 | |
|         return -1;
 | |
|     }
 | |
| }
 |