Here you can find the source of sanitizeGoogleId(String rawGoogleId)
public static String sanitizeGoogleId(String rawGoogleId)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w . j a v a 2 s . c o m*/ * Sanitizes a google ID by removing leading/trailing whitespace * and the trailing "@gmail.com". * * @return the sanitized google ID or null (if the parameter was null). */ public static String sanitizeGoogleId(String rawGoogleId) { if (rawGoogleId == null) { return null; } String sanitized = rawGoogleId.trim(); if (sanitized.toLowerCase().endsWith("@gmail.com")) { sanitized = sanitized.split("@")[0]; } return sanitized.trim(); } }