function Crawler::normalizeWhitespace
2 calls to Crawler::normalizeWhitespace()
- Crawler::innerText in vendor/
symfony/ dom-crawler/ Crawler.php - Returns only the inner text that is the direct descendent of the current node, excluding any child nodes.
- Crawler::text in vendor/
symfony/ dom-crawler/ Crawler.php - Returns the text of the first node of the list.
File
-
vendor/
symfony/ dom-crawler/ Crawler.php, line 1233
Class
- Crawler
- Crawler eases navigation of a list of \DOMNode objects.
Namespace
Symfony\Component\DomCrawlerCode
private function normalizeWhitespace(string $string) : string {
return trim(preg_replace("/(?:[ \n\r\t\f]{2,}+|[\n\r\t\f])/", ' ', $string), " \n\r\t\f");
}