Skip to content

Commit 3e1ebac

Browse files
committed
add substring function
1 parent 771ca81 commit 3e1ebac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Functions/Substring.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Appel\SqliteFunctions\Functions;
4+
5+
use Closure;
6+
7+
class Substring extends AbstractFunction
8+
{
9+
public function mysql(): Closure
10+
{
11+
return function ($string, $start, $length = null) {
12+
return substr($string, $start, $length);
13+
};
14+
}
15+
}

0 commit comments

Comments
 (0)