What if XmxStr.length < 1? Is it an error? Is it ok that we return 0L in this case?