Effects of organized surfactant assemblies on acid-base equilibria