We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea318d9 commit e20bfb1Copy full SHA for e20bfb1
R/classes.R
@@ -26,6 +26,13 @@ setClass(
26
)
27
28
29
+setClass(
30
+ "boundary",
31
+ representation(
32
+ value = "character"
33
+ )
34
+)
35
+
36
fixed <- function(x, ignore_case = FALSE) {
37
new("fixed", value = x, ignore_case = ignore_case)
38
}
@@ -85,3 +92,16 @@ get_coll <- function(x) {
85
92
86
93
x@value
87
94
95
96
+boundary <- function(x) {
97
+ if (is.null(x)) {
98
+ return(NULL)
99
+ }
100
+ switch(
101
+ x,
102
+ "word" = get_boundary_word(),
103
+ "sentence" = get_boundary_sentence(),
104
+ "line_break" = get_boundary_linebreak(),
105
+ "character" = get_boundary_character()
106
107
+}
0 commit comments