You are here

public static function Connection::sqlFunctionSubstring in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection::sqlFunctionSubstring()

SQLite compatibility implementation for the SUBSTRING() SQL function.

File

core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php, line 238
Contains \Drupal\Core\Database\Driver\sqlite\Connection.

Class

Connection
SQLite implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\Core\Database\Driver\sqlite

Code

public static function sqlFunctionSubstring($string, $from, $length) {
  return substr($string, $from - 1, $length);
}