1.20.x drupal.inc drupal_truncate_bytes($string, $len)

Truncates a UTF-8-encoded string safely to a number of bytes.

Deprecated

since 1.0.0

See also

backdrop_truncate_bytes()

Related topics

File

includes/drupal.inc, line 2423
Contains constants and function wrappers for Drupal 7.x compatibility.

Code

function drupal_truncate_bytes($string, $len) {
  watchdog_deprecated_function('drupal', __FUNCTION__);
  return backdrop_truncate_bytes($string, $len);
}