namespace qualifiers is the complement of namespace tail. It returns the leading namespace qualifiers for string, or, when string is ::, the empty string. Qualifiers are namespace names separated by ::. The operation of namespace qualifiers is purely lexical. It does not check whether the namespace names exist.
The value of
namespace qualifiers ::foo::bar::x
is
::foo::bar