WP_Filesystem_Base::is_binary() – Determines if the string provided contains binary characters.

You appear to be a bot. Output may be restricted

Description

Determines if the string provided contains binary characters.

Usage

$bool = WP_Filesystem_Base::is_binary( $text );

Parameters

$text
( string ) required – String to test against.

Returns

bool True if string is binary, false otherwise.

Source

File name: wordpress/wp-admin/includes/class-wp-filesystem-base.php
Lines:

1 to 3 of 3
  public function is_binary( $text ) {
    return (bool) preg_match( '|[^\x20-\x7E]|', $text ); // chr(32)..chr(127)
  }
 

 View on GitHub View on Trac