Replace usage of strlen in CmdLineTool