aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/complete/string_util.h
blob: bafc578d82d55b211ce507c96095657824c443e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include <util/charset/unidata.h>

#include <string_view>

namespace NSQLComplete {

    static const char WordBreakCharacters[] = " \t\v\f\a\b\r\n`~!@#$%^&*-=+[](){}\\|;:'\".,<>/?";

    bool IsWordBoundary(char ch);

    size_t LastWordIndex(TStringBuf text);

    TStringBuf LastWord(TStringBuf text);

} // namespace NSQLComplete