Hacker News new | past | comments | ask | show | jobs | submit login

I don't understand getting hit by an edge case either. Here's mine using Linq.

  var bestFirstValue = possibleValues
    .Where(x => currentLine.IndexOf(x.searchString) != -1)
    .OrderBy(x => currentLine.IndexOf(x.searchString))
    .First()
    .intValue;



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: