text: #include "holberton.h"
  /**
   * binary_to_uint - function that converts a binary number to an unsigned int.
   * @b: given binary number
   * Return: he converted number or 0 if
   * there is one or more chars in the string b that is not 0 or 1
   * b is NULL
  */
  unsigned int binary_to_uint(const char *b)
  {
  	unsigned int n = 0;
  	int i = 0;
  
  	if (!b)
  		return (0);
  
  	while (b[i])
  	{
  		if (b[i] != '0' && b[i] != '1')
  			return (0);
  		i++;
  	}
  	i = 0;
  	while (b[i])
  	{
  		n = n << 1;
  		if (b[i] == '1')
  			n = n + 1;
  		i++;
  	}
  	return (n);
  }
  