transform the dot notation name into a name for input ID
if no ID was passed

@param   string  Dot notation input name
@return  string  transformed name for input ID
970217
public function transformNameForID($name)
    {
        $bits = explode('.', $name);
        array_walk(
            $bits,
            function (&$value, $key) {
                $value = ucfirst(strtolower($value));
            }
        );
        return implode('', $bits);
    }
1310957
public function transform($value): ?string
    {
        /** TODO add sanity check is array of Location object? */
        if (!is_array($value) || empty($value)) {
            return null;
        }

        return implode(',', array_column($value, 'id'));
    }
603466
private static String convertToValidJavaClassname(String inName) {
        if (inName == null) return "_";
        if (inName.startsWith("scriptdef_")) inName = inName.substring(10);
        if (inName.equals("")) return "_";

        StringBuilder output = new StringBuilder(inName.length());
        boolean firstChar = true;
        for (int i = 0; i < inName.length(); ++i) {
            char ch = inName.charAt(i);
            if (firstChar && !Character.isJavaIdentifierStart(ch)) {
                ch = '_';
            } else if (!firstChar
                    && !(Character.isJavaIdentifierPart(ch) || ch == '.')) {
                ch = '_';
            }
            firstChar = (ch == '.');
            output.append(ch);
        }
        return output.toString();
    }
1186319
public function transformName($name)
    {
        if (strpos($name, '.') !== false) {
            $bits = explode('.', $name, 2);
            $bits['1'] = '[' . str_replace('.', '][', $bits['1']) . ']';
            return implode('', $bits);
        } else {
            return $name;
        }
    }
209659
private String deriveId(final String idName) {
		// Find parent naming context
		NamingContextable parent = WebUtilities.getParentNamingContext(this);

		// No Parent
		if (parent == null) {
			return idName;
		}

		// Get ID prefix
		String prefix = parent.getNamingContextId();

		// No Prefix, just use id name
		if (prefix.length() == 0) {
			return idName;
		}

		// Add Prefix
		StringBuffer nameBuf = new StringBuffer(prefix.length() + idName.length() + 1);
		nameBuf.append(prefix);
		nameBuf.append(ID_CONTEXT_SEPERATOR);
		nameBuf.append(idName);

		return nameBuf.toString();
	}
172003
public function getInputName()
  {
    $n = false;
    if ($f = $this->getForm()) {
      $n = $f->getName();
    }

    $inp = $this->getField();

    return $n ? $n . '[' . $inp . ']' : $inp;
  }
330103
public function getId()
    {
        $control = $this->control ? $this->control . '/' : '';

        return 'input-' . preg_replace('/[^A-Z0-9_]+/i', '-', $control . $this->getName(true));
    }
596814
public static function stringify_identifier($identifier)
	{
		// Identifier may not be empty, but can be false or 0
		if ($identifier === '' || $identifier === null)
		{
			throw new \FuelException('The identifier cannot be empty, must contain a value of any kind other than null or an empty string.');
		}

		// In case of string or int just return it as a string
		if (is_string($identifier) || is_int($identifier))
		{
			// cleanup to only allow alphanum chars, dashes, dots & underscores
			if (preg_match('/^([a-z0-9_\.\-]*)$/iuD', $identifier) === 0)
			{
				throw new \FuelException('Cache identifier can only contain alphanumeric characters, underscores, dashes & dots.');
			}

			return (string) $identifier;
		}
		// In case of array, bool or object return the md5 of the $identifier's serialization
		else
		{
			return '_hashes.'.md5(serialize($identifier));
		}
	}
321838
protected function generateId()
    {
        $inputId = static::$idPrefix . $this->getName();
        if ($this->isMultiple()) {
            $inputId = "{$inputId}-{$this->instances}";
        }
        $this->setAttribute('id', $inputId);
        return $inputId;
    }
629888
public function getID()
    {
        $idAttribute = $this->idAttribute;
        return (is_string($idAttribute) && !empty($idAttribute)) ? $this->$idAttribute : null;
    }
812944
public String fullyQualifiedSymbolName(String name) {
        if (name.equals(SymbolsTable.ME)) {
            return "$".concat(id());
        } else if (name.startsWith("$")) {
            return "$" + id() + '.' + name.substring(1);
        }
        return id() + '.' + name;
    }
441218
public function getNameIdNameQualifier()
    {
        $nameIdNameQualifier = null;
        $nameIdData = $this->getNameIdData();
        if (!empty($nameIdData) && isset($nameIdData['NameQualifier'])) {
            $nameIdNameQualifier = $nameIdData['NameQualifier'];
        }
        return $nameIdNameQualifier;
    }
433848
function name( $i ){
		if( is_int($i) ){
			if( ! isset($this->names[$i]) ){
				trigger_error("symbol ".var_export($i,1)." is unknown in ".get_class($this), E_USER_NOTICE );
				return 'UNKNOWN';
			}
			else {
				return $this->names[$i];
			}
		}
		else if ( ! isset($this->literals[$i]) ){
			trigger_error("literal symbol ".var_export($i,1)." is unknown in ".get_class($this), E_USER_NOTICE );
		}
		return $i;
	}
114295
private function generateIdentifierName($identifier)
    {
        // Always generate name for unquoted identifiers to ensure consistency.
        $identifier = new Identifier($identifier);

        return strtoupper(dechex(crc32($identifier->getName())));
    }
1210891
public static function renderValidNodeName($name)
    {
        // Check if name already match name pattern to prevent unnecessary transliteration
        if (preg_match(NodeInterface::MATCH_PATTERN_NAME, $name) === 1) {
            return $name;
        }

        $originalName = $name;

        // Transliterate (transform 北京 to 'Bei Jing')
        $name = Transliterator::transliterate($name);

        // Urlization (replace spaces with dash, special special characters)
        $name = Transliterator::urlize($name);

        // Ensure only allowed characters are left
        $name = preg_replace('/[^a-z0-9\-]/', '', $name);

        // Make sure we don't have an empty string left.
        if ($name === '') {
            $name = 'node-' . strtolower(md5($originalName));
        }

        return $name;
    }
129216
function intToID(num) {
  var idName = '';
  while (num > 0) {
    num--;
    idName = String.fromCharCode((num % 26) + 'a'.charCodeAt(0)) + idName;
    num = Math.floor(num / 26)
  }
  return idName;
}
1263022
public String getId() {
        Pattern replace = Pattern.compile("\\W+");
        return StringUtils.defaultIfEmpty(id, replace.matcher(getName()).replaceAll(""));
    }