public static function Connection::sqlFunctionSubstring

public static Connection::sqlFunctionSubstring($string, $from, $length)

SQLite compatibility implementation for the SUBSTRING() SQL function.

File

core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php, line 233

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);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Driver!sqlite!Connection.php/function/Connection::sqlFunctionSubstring/8.1.x