Certainly. You can also get that result by specifying a different separator: in this case, "\\s*,\\s*".

Is there any situation in which a consumer of this API *wouldn't* want a principal name to have trim() called on it?