lib: Optimize StringBlock class methods.