Longwelwind / Phi

Phi is a Rimworld mod that enables multiplayer interactions between players
50 stars 19 forks source link

Case Insensitive Search #6

Closed SimonNguyen closed 8 years ago

SimonNguyen commented 8 years ago

This change will allow you to search for modded items more easily without having to worry about case.

this.filteredInventory = this.inventory.Where((t) => t.Label.Contains(filterTerm)).ToList();

Add the StringComparison value OrdinalIgnoreCase to the Contains() method:

this.filteredInventory = this.inventory.Where((t) => t.Label.Contains(filterTerm, StringComparison.OrdinalIgnoreCase)).ToList();

Longwelwind commented 8 years ago

Fixed, but I wasn't able to do exactly this method.

SimonNguyen commented 8 years ago

I wasn't sure if that method would work or not since I couldn't test it. Thanks for the quick turnaroud!