#pragma once #include template static inline void ScanKeyValue(TStringBuf s, F&& f) { TStringBuf key, val; while (!s.empty()) { val = s.NextTok(sep); if (val.empty()) { continue; // && case } key = val.NextTok(sepKeyVal); if (addAll || val.IsInited()) { f(key, val); // includes empty keys } } }