Skip to content

Commit

Permalink
fix: #19 support only ascii separators
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Sep 28, 2021
1 parent 68d364c commit f6db336
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
make test suite=reverse
make test suite=split_part
make test suite=stats
make test suite=text
- name: Build for Windows
if: matrix.os == 'windows-latest'
Expand Down
2 changes: 2 additions & 0 deletions docs/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ sqlite> select split_part('one/two\three', '/\', 2);
two
```

Only ASCII (1-byte) symbols are supported as separators.

[Download](https://github.com/nalgeon/sqlean/releases/latest)

## Usage
Expand Down
6 changes: 4 additions & 2 deletions test/split_part.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
select '01', split_part(NULL, ',', 2) is NULL;
select '02', split_part('', ',', 2) = '';
select '03', split_part('one,two,three', ',', 2) = 'two';
select '04', split_part('onetwothree', '', 2) = 'two';
select '04', split_part('one|two|three', '|', 2) = 'two';
select '05', split_part('один,два,три', ',', 2) = 'два';
select '06', split_part('one,two,three', ',', 10) = '';
select '07', split_part('one,two,three', ';', 2) = '';
select '08', split_part('one,two,three', '', 1) = 'one,two,three';
select '09', split_part('one, two, three', ', ', 2) = 'two';
select '10', split_part('one,two,three', NULL, 2) is NULL;
select '11', split_part('one,,,four', ',', 2) = '';
select '12', split_part('one,,,four', ',', 4) = 'four';
select '13', split_part('one/two|three', '/|', 2) = 'two';
7 changes: 0 additions & 7 deletions test/text.sql

This file was deleted.

0 comments on commit f6db336

Please sign in to comment.