Function __global->_strip_comcode

Definitions

sources/comcode_to_text.php

  • Make some Comcode more readable by humans.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$in string No No required parameter N/A N/A Comcode text to change
$for_extract boolean No No False N/A N/A Whether this is for generating an extract that does not need to be fully comprehended (i.e. favour brevity)
$tags_to_preserve array No No [] N/A N/A List of tags to preserve
$include_urls boolean No No False N/A N/A Whether to include URLs in the text version

Returns

  • Clean text
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make some Comcode more readable by humans.
 *
 * @param  string $in Comcode text to change
 * @param  boolean $for_extract Whether this is for generating an extract that does not need to be fully comprehended (i.e. favour brevity)
 * @param  array $tags_to_preserve List of tags to preserve
 * @param  boolean $include_urls Whether to include URLs in the text version
 * @return string Clean text
 */

function _strip_comcode(string $in, bool $for_extract = false, array $tags_to_preserve = [], bool $include_urls = false) : string