Avoid strlen usage