/*!
Returns the text.
198573
function title( $contentObjectAttribute, $value = null )
    {
        $text = eZXMLTextType::rawXMLText( $contentObjectAttribute );

        $dom = new DOMDocument( '1.0', 'utf-8' );
        $success = $dom->loadXML( $text );

        // Get first text element of xml
        if ( !$success )
        {
            return $text;
        }

        $root = $dom->documentElement;
        $section = $root->firstChild;
        $textDom = false;
        if ( $section )
        {
            $textDom = $section->firstChild;
        }

        if ( $textDom && $textDom->hasChildNodes() )
        {
            $text = $textDom->firstChild->textContent;
        }
        elseif ( $textDom )
        {
            $text = $textDom->textContent;
        }

        return $text;
    }
1160071
function () {
    var text = ''
    var regx = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
    for (var idx = 0; idx < 8; idx++) {
      text = text + regx.charAt(Math.floor(Math.random() * regx.length))
    }
    return text
  }
1260201
function get_text_x_inline( $text, $context, $key ) {
            return _fs_text_x_inline( $text, $context, $key, $this->_slug );
        }
298038
function getLoadingText()
    {
        return isset($this->getConfig()->search->loadingText) ? $this->getConfig()->search->loadingText : 'loading';
    }
1113487
function displayText( $alternativeText = null )
    {
        if ( $alternativeText === null )
            $text = $this->attribute( 'alternative_text' );
        else
            $text = $alternativeText;

        return $text;
    }
75354
public static function format($text) {
		$text = preg_replace_callback('/<b>(.+?)<\/b>/', function($matches) {
			return SS_Cli::text($matches[1], null, null, true);
		}, $text);

		$text = preg_replace_callback('/<success>(.+?)<\/success>/', function($matches) {
			return SS_Cli::text($matches[1], 'green', null, true);
		}, $text);

		$text = preg_replace_callback('/<error>(.+?)<\/error>/', function($matches) {
			return SS_Cli::text($matches[1], 'red', null, true);
		}, $text);

		$text = preg_replace_callback('/<caution>(.+?)<\/caution>/', function($matches) {
			return SS_Cli::text($matches[1], 'yellow', null, true);
		}, $text);

		$text = preg_replace_callback('/<info>(.+?)<\/info>/', function($matches) {
			return SS_Cli::text($matches[1], 'cyan', null, true);
		}, $text);


		return $text;
	}
866090
function textForFilter( $filterData )
    {
        $text = false;
        if ( isset( $this->FilterMap[$filterData['name']] ) )
        {
            $filterDefinition =& $this->FilterMap[$filterData['name']];
            $text = $this->convertFilterToText( $filterDefinition, $filterData );
        }
        return $text;
    }
254334
private function _parseRichText($is = null) 
    {
        $value = array();

        if (isset($is->t)) {
            $value[] = (string)$is->t;
        } else {
            foreach ($is->r as $run) {
                $value[] = (string)$run->t;
            }
        }

        return implode('', $value);
    }
762690
public function getText()
    {
        $text = trim($this->text);
        $lines = explode("\n", $text);

        return implode("\n", array_map('trim', $lines));
    }
510811
function gettext($string)
    {
        global $PPHP;
        $req = grab('request');

        $default = $PPHP['config']['global']['default_lang'];
        $current = $req['lang'];

        $res = $string;
        try {
            if (self::$_gettext !== null) {
                $res = self::$_gettext->gettext($string);
            };
        } catch (\Exception $e) {
            echo $e->getMessage();
        };
        return $res;
    }
973843
function get_data() {
        $data = parent::get_data();

        if ($data !== null and isset($data->description)) {
            $data->descriptionformat = $data->description['format'];
            $data->description = $data->description['text'];
        }

        return $data;
    }
173597
function progressText()
    {
        if ( $this->Progress == self::PROGRESS_UNKNOWN )
        {
            return ezpI18n::tr( 'ezscriptmonitor', 'Unknown' );
        }

        if ( $this->Progress < 0 )
        {
            return '0%';
        }

        if ( $this->Progress > 100 )
        {
            return '100%';
        }

        return $this->Progress . '%';
    }
1026703
def text(el, strip=True):
    
    if not el:
        return ""

    text = el.text
    if strip:
        text = text.strip()
    return text
501724
function getText (element, callback) {
  const iterator = new NodeIterator(element)
  let next
  while ((next = iterator.getNext())) {
    if (next.nodeType === nodeType.textNode && next.data !== '') {
      callback(next.data)
    } else if (next.nodeType === nodeType.elementNode && next.nodeName === 'BR') {
      callback(' ') // eslint-disable-line standard/no-callback-literal
    }
  }
}
1181296
function getTextFromContent(contentNodes) {
  if (contentNodes === null) {
    return '';
  }
  const texts = [...contentNodes].map(node => node.textContent);
  const text = texts.join('').trim();
  return unescapeHtml(text);
}
643309
function borkify( $text )
    {
        $textBlocks = preg_split( "/(%[^ ]+)/", $text, -1, PREG_SPLIT_DELIM_CAPTURE );
        $newTextBlocks = array();
        foreach ( $textBlocks as $text )
        {
            if ( $text[0] == '%' )
            {
                $newTextBlocks[] = $text;
                continue;
            }
            $orgtext = $text;
            $text = preg_replace( "/a\B/", "e", $text );
            $text = preg_replace( "/an/", "un", $text );
            $text = preg_replace( "/au/", "oo", $text );
            $text = preg_replace( "/en\b/", "ee", $text );
            $text = preg_replace( "/\Bew/", "oo", $text );
            $text = preg_replace( "/\Bf/", "ff", $text );
            $text = preg_replace( "/\Bi/", "ee", $text );
            $text = preg_replace( "/\Bir/", "ur", $text );
            $text = preg_replace( "/\bo/", "oo", $text );
            $text = preg_replace( "/ow/", "oo", $text );
            $text = preg_replace( "/ph/", "f", $text );
            $text = preg_replace( "/th\b/", "t", $text );
            $text = preg_replace( "/\Btion/", "shun", $text );
            $text = preg_replace( "/\Bu/", "oo", $text );
            $text = preg_replace( "/\bU/", "Oo", $text );
            $text = preg_replace( "/y\b/", "ai", $text );
            $text = preg_replace( "/v/", "f", $text );
            $text = preg_replace( "/w/", "v", $text );
            $text = preg_replace( "/ooo/", "oo", $text );
            if ( $orgtext == $text )
                $text = $text . "-a";
            $newTextBlocks[] = $text;
        }
        $text = implode( '', $newTextBlocks );
        $text = preg_replace( "/([:.?!])(.*)/", "\\2\\1", $text );
        $text = "[" . $text . "]";
        return $text;
    }
372894
def get_text
      l = getvalue
      str = ""
      old = " "
      l.each_with_index do |line, i|
        tmp = line.gsub("\n","")
        tmp.gsub!("\r", "\n")
        if old[-1,1] !~ /\s/ and tmp[0,1] !~ /\s/
          str << " "
        end
        str << tmp
        old = tmp
      end
      str
    end