Convenience method
Utilizes manager's implementation of doShortcode
Limits search to this shortcode's context.

@param string $content
@param bool   $deep

@throws RegisterException

@return string
429677
public function doShortcode(string $content, bool $deep = false): string
    {
        if (!($this->isBound())) {
            throw RegisterException::missing($this->name);
        }

        return $this->manager->doShortcode($content, $this->getContext(), $deep);
    }
1366128
private function detectMimeBySniffingContent(string $content): string
    {
        if (preg_match('/^\\{.*\\}$/is', $content)) {
            return 'application/json';
        }
        if (preg_match('/^([^=&])+=[^=&]+(&[^=&]+=[^=&]+)*$/', $content)) {
            return 'application/x-www-form-urlencoded';
        }
        if (preg_match('/^<.*>$/s', $content)) {
            return 'text/xml';
        }

        return 'application/octet-stream';
    }
316281
public static function getContentMimeType($content)
    {
        $finfo = finfo_open(FILEINFO_MIME_TYPE);
        $mimeType = finfo_buffer($finfo, $content);
        finfo_close($finfo);

        return $mimeType;
    }
281608
public function indent(int $depth, string $content) : string
    {
        if (!$this->pretty) {
            return $content;
        }

        return PHP_EOL . str_repeat('    ', $this->depth) . $content;
    }
761958
public static function isCnab400($content)
    {
        $content = is_array($content) ? $content[0] : $content;
        return mb_strlen(rtrim($content, "\r\n")) == 400 ? true : false;
    }
1089875
public function closure($content = null)
    {
        $this->addNewToSequence("open");

        if (!empty($content)) {
            if ($content instanceof TokenSequencer) {
                $this->mergeSequence($content->getSequence());
            } elseif ($content instanceOf Token) {
                $this->addToSequence($content);
            } elseif (is_array($content)) {
                foreach ($content as $subContent) {
                    $this->addMixedContentToSequence($subContent);
                }
            } else {
                $this->val($content);
            }
        }

        $this->addNewToSequence("close");

        return $this;
    }
848704
public function limitChar($content, $limit = 100)
    {
        if (strlen($content) <= $limit) {
            return $content;
        } else {
            $hasil = substr($content, 0, $limit);
            return $hasil . "...";
        }
    }
726453
public function callShortcode($tag, $attributes, $content, $extra = array())
    {
        if (!$tag || !isset($this->shortcodes[$tag])) {
            return false;
        }
        return call_user_func($this->shortcodes[$tag], $attributes, $content, $this, $tag, $extra);
    }
341634
public function getContentType($short = true)
    {
        if (isset($_SERVER['CONTENT_TYPE'])) {
            $content_type = $_SERVER['CONTENT_TYPE'];
            if ($short) {
                return Utils::substrToString($content_type,';');
            }
            return $content_type;
        }
        return null;
    }
254833
public function parseNoTemplate($content) {
        $this->_content = $content;
        $this->_parseDebugStart();
        $this->_parseExtend();
        $this->_parseInclude();
        $this->_parsePath();
        $this->_parseGravatar();
        $this->_parseAsset();
        $this->_parseUrl();
        $this->_parsePhp();
        $this->_parseLang();
        $this->_parseForeach();
        $this->_parseFor();
        $this->_parseVar();
        $this->_parseVarFunc();
        $this->_parseCondition();
        $this->_parseFunction();
        $this->_parseException();
        $this->_parseMinify();
        $this->_parseDebugEnd();

        return $this->_content;
    }
962764
function strip_shortcodes( $content ) {
	global $shortcode_tags;

	if (empty($shortcode_tags) || !is_array($shortcode_tags))
		return $content;

	$pattern = $this->get_shortcode_regex();

	return preg_replace('/'.$pattern.'/s', '$1$6', $content);
}
1039639
private function checkSingleValuedContent(&$content)
    {
        if (is_string($content) and ! $this->isSingleValued()) {
            $content = array_map('trim', explode(' ', $content));
        }
    }
490948
public static String urlDecode(String content, TestContext context) {
        return new UrlDecodeFunction().execute(Collections.singletonList(content), context);
    }
295106
public function getExcerpt($content = null)
    {
        $raw = $exc = $this->base->post_excerpt;

        if (!strlen($exc)) {
            $exc = $content === null ? $this->getRawContent() : $content;
            $exc = strip_shortcodes($exc);
            $exc = apply_filters('the_content', $exc);
            $exc = str_replace(']]>', ']]&gt;', $exc);
            $exc = wp_trim_words(
                $exc,
                apply_filters('excerpt_length', 55),
                apply_filters('excerpt_more', ' ' . '[&hellip;]')
            );
        }

        return apply_filters('wp_trim_excerpt', $exc, $raw);
    }
1269716
public static function getMimeTypeByContent(string $content)
    {
        if (!\class_exists('\finfo', false)) {
            return null;
        }

        try {
            $finfo = new \finfo(FILEINFO_MIME_TYPE);

            return $finfo->buffer($content) ?: null;
            // @codeCoverageIgnoreStart
        } catch (\ErrorException $e) {
            // This is caused by an array to string conversion error.
            return null;
        }
    }
978646
public function writeBase64 ($content)
    {
        $parts = explode(',', $content);
        if(count($parts) > 1) {
            $base64_encoded = $parts[1];
            $this->writeOver(base64_decode($base64_encoded));
            return self::FILE_CREATE_SUCCESS;
        } else {
            return self::FILE_CREATE_ERROR;
        }

    }
580507
public function columnsShortCodeHandler( $atts, $content, $shortcode ) {
		if ( ! $content ) {
			return '';
		}

		$atts = shortcode_atts(
			[
				'class' => null,
				'count' => 2,
			],
			$atts,
			$shortcode
		);

		$classes = $atts['class'] ?? '';

		switch ( $atts['count'] ) {
			case 2:
				$classes .= ' twocolumn';
				break;
			case 3:
				$classes .= ' threecolumn';
				break;
			default:
				$classes .= ' twocolumn';
		}

		return sprintf(
			'<div class="%1$s">%2$s</div>',
			trim( $classes ),
			wpautop( trim( $content ) )
		);
	}