Returns a unique ID for this widget. Useful in creating HTML markup.
@param string $suffix An extra string to append to the ID.
@return string A unique identifier.
5842
public function getId($suffix = null)
    {
        $id = class_basename(get_called_class());

        if ($this->alias != $this->defaultAlias) {
            $id .= '-' . $this->alias;
        }

        if ($suffix !== null) {
            $id .= '-' . $suffix;
        }

        return HtmlHelper::nameToId($id);
    }
370286
public static function uuidgen($prefix = '', $suffix = '', $uppercase = true) {
        $uuid = trim(sprintf('%s%04x%04x%s', $prefix, mt_rand(0, 65535), mt_rand(0, 65535), $suffix));
        $result = $uppercase ? strtoupper($uuid) : strtolower($uuid);
        return $result;
    }
1044467
public static function removeSuffix(string $value, string $suffix): string
    {
        return self::hasSuffix($value, $suffix) ? substr($value, 0, -\strlen($suffix)) : $value;
    }
336695
public static function getClassShortName(
        string $class,
        string $suffix = ''
    ): string {
        $baseName = static::getClassBaseName($class);

        return preg_replace(sprintf('/%s$/', $suffix), '', $baseName);
    }
1155047
private static String addSuffix(final String href, final String suffix) {
        final int idx = href.lastIndexOf(".");
        return idx != -1
                ? (href.substring(0, idx) + suffix + href.substring(idx))
                : (href + suffix);
    }
306477
public static function rstrip($str, $suffix)
    {
        if (substr($str, -strlen($suffix)) == $suffix) {
            return substr($str, 0, -strlen($suffix));
        }
        return $str;
    }
316893
public function toAttr($prefix='', $suffix='') {
        $attrs = array();
        if ($this->width !== FALSE) {
            $attrs[] = 'width="'.addslashes($this->width).'"';
        }
        if ($this->height !== FALSE) {
            $attrs[] = 'height="'.addslashes($this->height).'"';
        }
        return $prefix.implode(' ', $attrs).$suffix;
    }
887343
public function endsWithIgnoreCase($suffix) {
		$other = new Str($suffix, $this->charset);

		return mb_strripos($this->rawString, $suffix, 0, $this->charset) === ($this->length() - $other->length());
	}
340224
public function getPublicFormKey($suffix = null)
    {
        $val = sprintf('%s_public_form', $this->getPostType());
        return ($suffix) ? sprintf('%s_%s', $val, $suffix) : $val;
    }
739616
protected function findAvailableIdByData($data)
    {
        $name = '';
        if (isset($data[$this->idField]) && is_string($data[$this->idField])) {
            $name = $data[$this->idField];
        }
        $suffix = 0;
        do {
            $id = $this->getIdByNameAndSuffix($name, $suffix);
            $suffix++;
        } while (!$this->isIdAvailable($id));
        return $id;
    }
725236
public String disAssembleId(String id, String... suffixes) {
		int count = 0;
		for (String s : suffixes) {
			count += s.length() + Dom.ID_SEPARATOR.length();
		}
		return id.substring(0, id.length() - count);
	}
288687
def _unique_id(self, prefix):
        
        _id = self._id_gen
        self._id_gen += 1
        return prefix + str(_id)
1250580
public function getSuffix() : ?string 
    {
        if ( ! $this->hasSuffix()) {
            $this->setSuffix($this->getDefaultSuffix());
        }
        return $this->suffix;
    }
257325
public function setSuffix($suffix)
    {
        $suffix = ltrim((string) $suffix, '.');
        $this->suffix = '.' . $suffix;
        return $this;
    }
778416
protected static function buildTableName($suffix = '')
    {
        if (true === empty(static::$tablePrefix)) {
            if (strpos(static::tableName(), '}}') !== false) {
                $name = str_replace('}}', $suffix . '}}', static::tableName());
            } else {
                $name = static::tableName() . $suffix;
            }
        } else {
            $name = static::$tablePrefix . $suffix;
        }
        return $name;
    }
618407
public function getFilesUrl($suffix = '') {
		$generator = $this->getServiceContainer()->getUrlGenerator();
		return $generator->generateUrl($this->getFilesPuliPath() . '/' . $suffix);
	}
7737
public function getBasepath($suffix = null)
    {
        $relativeDirectory = '.';

        $givenRelativePath = dirname($this->getCurrentPage());

        if ($givenRelativePath === '/') {
            $givenRelativePath = '';
        }

        $depth = substr_count($givenRelativePath, '/');

        for ($i = 0; $i < $depth; $i++) {
            $relativeDirectory .= '/..';
        }

        if ($suffix) {
            return $relativeDirectory . '/' . $suffix;
        } else {
            return $relativeDirectory;
        }
    }