def getUntilDot(text):
 dotIndex = text.rfind('.')
 if (dotIndex < 0):
  return text
 return text[:dotIndex]

def getUntilDot ( text ) : dotIndex = text . rfind ( '.' ) if ( dotIndex < 0 ) : return text return text [ : dotIndex ]
get the text until the last dot .