Some string operations in core.query