pub fn alpha<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where
    T:Index<Range<usize>, Output=T>+Index<RangeFrom<usize>, Output=T>,
    &'a T: IterIndices+InputLength {
  let input_length = input.input_len();
  if input_length == 0 {
    return Error(Position(ErrorKind::Alpha, input))
  }

  for (idx, item) in input.iter_indices() {
    if ! item.is_alpha() {
      if idx == 0 {
        return Error(Position(ErrorKind::Alpha, input))
      } else {
        return Done(&input[idx..], &input[0..idx])
      }
    }
  }
  Done(&input[input_length..], input)
}
/// Recognizes lowercase and uppercase alphabetic characters: a-zA-Z
Recognizes lowercase and uppercase alphabetic characters: a-zA-Z
Recognizes lowercase and uppercase alphabetic characters : a - zA - Z
pub fn alpha<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where
    T:Index<Range<usize>, Output=T>+Index<RangeFrom<usize>, Output=T>,
    &'a T: IterIndices+InputLength {
  let input_length = input.input_len();
  if input_length == 0 {
    return Error(Position(ErrorKind::Alpha, input))
  }
  for (idx, item) in input.iter_indices() {
    if ! item.is_alpha() {
      if idx == 0 {
        return Error(Position(ErrorKind::Alpha, input))
      } else {
        return Done(&input[idx..], &input[0..idx])
      }
    }
  }
  Done(&input[input_length..], input)
}
pub fn alpha < ' a , T : ? Sized > ( input : & ' a T ) -> IResult < & ' a T , & ' a T > where T : Index < Range < usize > , Output = T > + Index < RangeFrom < usize > , Output = T > , & ' a T : IterIndices + InputLength { let input_length = input . input_len ( ) ; if input_length == 0 { return Error ( Position ( ErrorKind :: Alpha , input ) ) } for ( idx , item ) in input . iter_indices ( ) { if ! item . is_alpha ( ) { if idx == 0 { return Error ( Position ( ErrorKind :: Alpha , input ) ) } else { return Done ( & input [ idx .. ] , & input [ 0 .. idx ] ) } } } Done ( & input [ input_length .. ] , input ) }
Recognizes lowercase and uppercase alphabetic characters: a-zA-Z
Recognizes lowercase and uppercase alphabetic characters : a - zA - Z
input
&'a T