Unqualify a string qualified by a separator character. For example,
"this:name:is:qualified" returns "qualified" if using a ':' separator.
@param qualifiedName the qualified name
@param separator the separator
339568
public static String unqualify(String qualifiedName, char separator) {
        return qualifiedName.substring(qualifiedName.lastIndexOf(separator) + 1);
    }
533725
public static String collapseQualifier(String qualifier, boolean includeDots) {
    StringTokenizer tokenizer = new StringTokenizer(qualifier, ".");
    String collapsed = Character.toString(tokenizer.nextToken().charAt(0));
    while (tokenizer.hasMoreTokens()) {
      if (includeDots) {
        collapsed += '.';
      }
      collapsed += tokenizer.nextToken().charAt(0);
    }
    return collapsed;
  }
237239
public static QualifiedName valueOf(String value, NamespaceContext ctx) {
        if (value == null) {
            throw new IllegalArgumentException("value must not be null");
        }
        int colon = value.indexOf(':');
        int closingBrace = value.indexOf('}');
        boolean qnameToStringStyle = value.startsWith("{") && closingBrace > 0;
        if (!qnameToStringStyle && colon < 0) {
            return new QualifiedName(value); // null namespace
        }
        return qnameToStringStyle ? parseQNameToString(value, closingBrace)
            : parsePrefixFormat(value, colon, ctx);
    }
897084
static void validateValueUniquenessInScope(String qualifiedName,
      List<TypeElement> nestedElements) {
    Set<String> names = new LinkedHashSet<>();
    for (TypeElement nestedElement : nestedElements) {
      if (nestedElement instanceof EnumElement) {
        EnumElement enumElement = (EnumElement) nestedElement;
        for (EnumConstantElement constant : enumElement.constants()) {
          String name = constant.name();
          if (!names.add(name)) {
            throw new IllegalStateException(
                "Duplicate enum constant " + name + " in scope " + qualifiedName);
          }
        }
      }
    }
  }
847522
public static Segment fromScopedName(String qualifiedName) {
        if (StreamSegmentNameUtils.isTransactionSegment(qualifiedName)) {
            String originalSegmentName = StreamSegmentNameUtils.getParentStreamSegmentName(qualifiedName);
            return fromScopedName(originalSegmentName);
        } else {
            List<String> tokens = StreamSegmentNameUtils.extractSegmentTokens(qualifiedName);
            if (tokens.size() == 2) { // scope not present
                String scope = null;
                String streamName = tokens.get(0);
                long segmentId = Long.parseLong(tokens.get(1));
                return new Segment(scope, streamName, segmentId);
            } else { // scope present
                String scope = tokens.get(0);
                String streamName = tokens.get(1);
                long segmentId = Long.parseLong(tokens.get(2));
                return new Segment(scope, streamName, segmentId);
            }
        }
    }
594027
@Override
    public Resource qualifiedNameToResource(QualifiedName name) {
	String unescapedLocalName = qnU.unescapeProvLocalName(name.getLocalPart());
	if (isBlankName(name)) {
	    return new BNodeImpl(unescapedLocalName);
	} else {
	    return new URIImpl(name.getNamespaceURI() + unescapedLocalName);

	}
    }
1034155
public QualifiedName getCurrentElementQualifiedName()
	{
		XmlPullParser parser = mParser;
		return QualifiedName.get(parser.getNamespace(), parser.getName());
	}
189030
public static String getQualifierAction(String qualifierAsString) {
    int pos = qualifierAsString.lastIndexOf(DELIMITER);
    if (pos == -1) {
      throw new IllegalArgumentException("Wrong qualifier format: '" + qualifierAsString + "'");
    }
    return qualifierAsString.substring(pos + 1);
  }
1219169
def qualified_name_import(cls):
    

    parts = qualified_name(cls).split('.')

    return "from {} import {}".format('.'.join(parts[:-1]), parts[-1])
415441
private String ensureQualified(String name) {
        String qualifier = String.format("%s.", this.modelInfo.getName());
        if (!name.startsWith(qualifier)) {
            return String.format("%s%s", qualifier, name);
        }

        return name;
    }
632138
public final boolean isQualifiedName() {
    switch (this.getToken()) {
      case NAME:
        return !getString().isEmpty();
      case THIS:
      case SUPER:
        return true;
      case GETPROP:
        return getFirstChild().isQualifiedName();

      case MEMBER_FUNCTION_DEF:
        // These are explicitly *not* qualified name components.
      default:
        return false;
    }
  }
1292063
def handle_identifier_qualified(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        """"""
        namespace, name = tokens[NAMESPACE], tokens[NAME]

        self.raise_for_missing_namespace(line, position, namespace, name)
        self.raise_for_missing_name(line, position, namespace, name)

        return tokens
556529
public static boolean isValidQualifiedName(FeatureSet mode, String name) {
    if (name.endsWith(".") || name.startsWith(".")) {
      return false;
    }

    List<String> parts = Splitter.on('.').splitToList(name);
    for (String part : parts) {
      if (!isValidPropertyName(mode, part)) {
        return false;
      }
    }
    return isValidSimpleName(parts.get(0));
  }
687502
public static function classname($qualifiedName)
    {
        if (false !== $pos = strrpos($qualifiedName, '.')) {
            return substr($qualifiedName, $pos + 1); // start just after '.'
        } elseif (false !== $pos = strrpos($qualifiedName, '\\')) {
            return substr($qualifiedName, $pos + 1);
        } else {
            return $qualifiedName;  // there is no '.' in the qualified name
        }

    }
1093523
protected static String qualifiedNameFromIdAndContext(String name, String context) {
        if (!name.contains(".")) {
            return context + "." + name;
        }
        return name;
    }
671401
def qualified_name(self):
        ''''''
        return '{0}.{1}#{2}'.format(self.module.name, self.enum.name, self.name)
766358
private static void checkFilePattern(String s) throws ProblemException {
        // File names like foo/bar/gamma/Bar.java are allowed,
        // as well as /bar/jndi.properties as well as,
        // */bar/Foo.java
        Pattern p = null;
        if (File.separatorChar == '\\') {
            p = Pattern.compile("\\*?(.+\\\\)*.+");
        }
        else if (File.separatorChar == '/') {
            p = Pattern.compile("\\*?(.+/)*.+");
        } else {
            throw new ProblemException("This platform uses the unsupported "+File.separatorChar+
                                      " as file separator character. Please add support for it!");
        }
        Matcher m = p.matcher(s);
        if (!m.matches()) {
            throw new ProblemException("The string \""+s+"\" is not a proper file name.");
        }
    }