Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:find(input_string,string_pattern,[ignore_case], [start_index])

find(inputstring_to_stringsearch, stringsearch_patternfor,[ignore_case], [start_indexat])


ArgumentRequired?Data TypeDescription
input
string_to_
string
searchYstring

Name of the column, function returning a string, or string literal to be applied to the function.

string
search_
pattern
forYstring
Name of column

The string or pattern you want to look for. This can be a string, function returning a string, or string literal or

pattern to find

D s lang
itempattern
rtrue
pattern or regular expression.

ignore_caseNboolean
If true, a case-insensitive match is performed. Default
Indicates if the Find function ignores case when trying to match the string or pattern. The default value is false.
start_
index
atNinteger (non-negative)
If specified, this value identifies the start index value of the source data to search for a match

Indicates the position in the column or string literal value at which to begin the search. This value can be an integer, a function returning an integer, or a column containing integers. The default value is 0.

If not specified, the entire string is searched.

D s lang notes

...

...

Name of the item to be searched. Valid values can be:

  • String literals must be quoted ( 'Hello, World' ).
  • column Column reference to any type that can be inferred as a string, which encompasses all values.
  • Function returning a string value.

Missing values generate the start-index at parameter value.

  • Multiple values and wildcards are not supported.

...

Required?Data TypeExample Value
YesString literal, function returning a string, or column reference (String, Array, or Object)myColumn

...

search_

...

for

Column of strings, , function returning a string, string literal or pattern to find. An input value can be a literal, 

D s lang
itempattern
rtrue
, or a regular expression.

  • Missing string or column values generate the start-index at parameter value.
    • String literals must be quoted ('Hello, World').
  • Multiple values and wildcards are not supported.
  • Column names are not supported.

D s
snippetusage

Required?Data TypeExample Value
YesString literal or pattern'Hello'

ignore_case

If true, the FIND function  function ignores case when trying to match the string literal or pattern value.

...

Required?Data TypeExample Value
NoBooleantrue

start_

...

at

The index of Indicates the character position in the column or string literal value at  at which to begin the search. For example, a value of 2 instructs the FIND function to begin searching from the third character in the column or string value.

Info

NOTE: Index values begin at 0. If not specified, the default value is 0, which searches the entire string.

  • Value can be an integer, a function returning an integer, or a column containing integers. 

    • If a column name is specified, start_at can be different for each row.
    • If a constant integer value is specified, the start_at is same for all rows.

  • Value must be a non-negative integer value.

  • If this value is greater than the length of the string, then no match is possible.

...