@@ 1138-1139 (lines=2) @@ | ||
1135 | $pattern = "'%[^' + $char + ']%'"; |
|
1136 | ||
1137 | switch ($pos) { |
|
1138 | case TrimMode::LEADING: |
|
1139 | return 'SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))'; |
|
1140 | case TrimMode::TRAILING: |
|
1141 | return 'REVERSE(SUBSTR(REVERSE(' . $str . '), PATINDEX(' . $pattern . ', REVERSE(' . $str . '))))'; |
|
1142 | default: |
|
@@ 1140-1141 (lines=2) @@ | ||
1137 | switch ($pos) { |
|
1138 | case TrimMode::LEADING: |
|
1139 | return 'SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))'; |
|
1140 | case TrimMode::TRAILING: |
|
1141 | return 'REVERSE(SUBSTR(REVERSE(' . $str . '), PATINDEX(' . $pattern . ', REVERSE(' . $str . '))))'; |
|
1142 | default: |
|
1143 | return |
|
1144 | 'REVERSE(SUBSTR(REVERSE(SUBSTR(' . $str . ', PATINDEX(' . $pattern . ', ' . $str . '))), ' . |