onestring
Onestring is a term used in formal language theory and computer science to denote a string that consists of only a single repeated symbol from an alphabet. Formally, for an alphabet Σ and a symbol a ∈ Σ, a onestring of length n is a^n with n ≥ 1. The set of all onestrings is {a^n | a ∈ Σ, n ≥ 1}. The empty string is typically excluded from this definition, though some sources allow n = 0 as a degenerate case.
Examples include "aaa" over the alphabet {a}, "1111" over {1}, and in binary, "0" and "1" of
Properties: onestrings form a simple, regular language. They serve as basic test cases in automata, parsing,
Generation and recognition: given a string s, you can recognize a onestring by checking whether all characters
Variants: some discussions use the terms uniform string or constant string for the same concept. See also: