namespace split, an additional command for working with namespaces, splits a qualified name into its components.
namespace split can be trivially implemented using ycl regsplit:
package require {ycl string} namespace import [yclprefix]::string::regsplit proc nssplit ns { regsplit ::* ns lmap {val delim} $ns[set ns {}] { lindex $val } }
example:
puts [nssplit {::one::two three::::four::five::}] # -> {} one {two three} four five {}