We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c8caf0 commit 5343063Copy full SHA for 5343063
Library/base/base.vb
@@ -167,8 +167,16 @@ Public Module base
167
<ExportAPI("string_motif")>
168
Public Function string_motif(<RRawVectorArgument> x As Object,
169
Optional threshold As Double = 0.3,
170
- Optional any As Char = "-"c) As Object
171
-
172
- Return CommonTagParser.StringMotif(CLRVector.asCharacter(x), threshold, any)
+ Optional any As Char = "-"c,
+ Optional trim As Boolean = True) As Object
+
173
+ Dim motif As String = CommonTagParser.StringMotif(CLRVector.asCharacter(x), threshold, any)
174
+ If trim Then
175
+ motif = motif.Trim(any)
176
+ motif = motif.Replace(any & any, any)
177
178
179
+ End If
180
+ Return motif
181
End Function
182
End Module
0 commit comments