REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.19 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/woocommerce/src/Internal/ProductFeed/Utils/StringHelper.php
Text
Base64
<?php /** * String Helper class. * * @package Automattic\WooCommerce\Internal\ProductFeed */ declare(strict_types=1); namespace Automattic\WooCommerce\Internal\ProductFeed\Utils; if ( ! defined( 'ABSPATH' ) ) { exit; } /** * String utility helper functions * * @since 10.5.0 */ class StringHelper { /** * Convert value to boolean string ('true' or 'false') * * @since 10.5.0 * * @param mixed $value Value to convert. * @return string 'true' or 'false'. */ public static function bool_string( $value ): string { if ( is_bool( $value ) ) { return $value ? 'true' : 'false'; } if ( is_scalar( $value ) || null === $value ) { $value = strtolower( (string) $value ); } else { $value = ''; } return ( 'true' === $value || '1' === $value || 'yes' === $value ) ? 'true' : 'false'; } /** * Truncate text to specified length * * @since 10.5.0 * * @param string $text Text to truncate. * @param int $max_length Maximum length. * @return string Truncated text. */ public static function truncate( string $text, int $max_length ): string { if ( mb_strlen( $text ) > $max_length ) { return mb_substr( $text, 0, $max_length ); } return $text; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
MemoryManager.php
2.90 KB
lrw-r--r--
2026-01-19 14:46:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StringHelper.php
1.19 KB
lrw-r--r--
2026-01-19 14:46:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).