LibreOffice Module connectivity (master) 1
Protected Member Functions | List of all members
connectivity::file::OOp_Locate Class Reference

LOCATE(substr,str) POSITION(substr IN str) Returns the position of the first occurrence of substring substr in string str. More...

#include <FStringFunctions.hxx>

Inheritance diagram for connectivity::file::OOp_Locate:
[legend]
Collaboration diagram for connectivity::file::OOp_Locate:
[legend]

Protected Member Functions

virtual ORowSetValue operate (const std::vector< ORowSetValue > &lhs) const override
 
virtual ORowSetValue operate (const std::vector< ORowSetValue > &lhs) const =0
 

Additional Inherited Members

- Public Member Functions inherited from connectivity::file::ONthOperator
virtual void Exec (OCodeStack &) override
 
virtual void Exec (OCodeStack &)=0
 
- Public Member Functions inherited from connectivity::file::OCode
virtual ~OCode ()
 
 OCode (OCode &&)=default
 
 OCode (const OCode &)=default
 
 OCode ()=default
 
OCodeoperator= (const OCode &)=default
 
OCodeoperator= (OCode &&)=default
 

Detailed Description

LOCATE(substr,str) POSITION(substr IN str) Returns the position of the first occurrence of substring substr in string str.

Returns 0 if substr is not in str:

‍SELECT LOCATE('bar', 'foobarbar'); -> 4 SELECT LOCATE('xbar', 'foobar'); -> 0

LOCATE(substr,str,pos) Returns the position of the first occurrence of substring substr in string str, starting at position pos. Returns 0 if substr is not in str:

‍SELECT LOCATE('bar', 'foobarbar',5); -> 7

Definition at line 136 of file FStringFunctions.hxx.

Member Function Documentation

◆ operate()

ORowSetValue OOp_Locate::operate ( const std::vector< ORowSetValue > &  lhs) const
overrideprotectedvirtual

Implements connectivity::file::ONthOperator.

Definition at line 101 of file FStringFunctions.cxx.

References getString().


The documentation for this class was generated from the following files: