Helpo de LibreOffice 7.4
Liveras la pozicion de ĉeno en alia ĉeno.
La funkcio InStr liveras la pozicion kie la kongruo troviĝas. Se la ĉeno ne troveblas, la funkcio liveras nulon.
InStr ([Start As Long,] Text1 As String, Text2 As String[, Compare])
Integer
Start: A numeric expression that marks the position in a string where the search for the specified substring starts. If you omit this parameter, the search starts at the first character of the string. The minimum allowed value is 1. The maximum allowed value is 2,147,483,648.
Text1: La ĉena esprimo serĉota.
Text2: La ĉena esprimo serĉota.
Compare: Nedeviga numera esprimo kiu difinas la tipon de komparo. La valoro de ĉi tiu parametro povas esti 0 aŭ 1. La apriora valoro 1 specifas tekstan komparon kiu ne estas usklecodistinga. La valoro 0 specifas tekstan komparon kiu estas usklecodistinga.
To avoid a run-time error, do not set the Compare parameter if the first optional parameter is omitted.
Sub ExamplePosition
Dim sInput As String
Dim iPos As Integer
sInput = "Office"
iPos = Instr(sInput,"c")
Print iPos
End Sub