coisane: Fixed and improved searching for characters in strings