Substring from 0 upto the first '.', no need for a loop