Have I achieved a null- terminated C-string through the code?

            for (byte i = 0; i < x; i++)
            {
              lcd.print(digits[i]);
              unsigned long count = atol(digits);
              Serial.print(count);
              a = false;
            }

Why are you calling atol() and Serial.print() in a loop?