I'm trying to trim the @domain.xxx from email address leaving just the username. I'm not sure how to dynamically select the @ position and everything to the right of it. Could someone please provide an example of how to do this? The trim code below is where I'm lost.
email = "example@domain.com"
email....(trim code);
email.replace(email, "");