public static function getNodeName($nodeString)
    {
        $positionOfFirstAttribute = strpos($nodeString, '[@');

        if ($positionOfFirstAttribute === false) {
            return $nodeString;
        }

        return substr($nodeString, 0, $positionOfFirstAttribute);
    }
public static function getNodeName($nodeString)
    {
        $positionOfFirstAttribute = strpos($nodeString, '[@');

        if ($positionOfFirstAttribute === false) {
            return $nodeString;
        }

        return substr($nodeString, 0, $positionOfFirstAttribute);
    }
public static function getNodeName ( $ nodeString ) { $ positionOfFirstAttribute = strpos ( $ nodeString , '[@' ) ; if ( $ positionOfFirstAttribute === false ) { return $ nodeString ; } return substr ( $ nodeString , 0 , $ positionOfFirstAttribute ) ; }
Returns node name extracted from node string

The internal representation of CLDR uses array keys like:
'calendar[@type="gregorian"]'
This method helps to extract the node name from such keys.

@param string $nodeString String with node name and optional attribute(s)
@return string Name of the node
Returns node name extracted from node string