Longest run of a character in a string
05AB1E, 5 bytes
Code:
SQγOM

Uses the 05AB1E encoding. Try it online!
Explanation:
SQ      # Check for each character if it is equal to the second input
  γ     # Split the list of zeros and ones into groups
   O    # Sum each array in the arrays
    M   # Get the maximum