Debian Codegraph @

doc/SystemTap_Tapset_Reference/man3/function::strpos.3stap

raw
1 '\" t
2 .\" Title: function::strpos
3 .\" Author:
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: October 2025
6 .\" Manual: A collection of standard string functions
7 .\" Source: SystemTap Tapset Reference
8 .\" Language: English
9 .\"
10 .TH "FUNCTION::STRPOS" "3stap" "October 2025" "SystemTap Tapset Reference" "A collection of standard strin"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 function::strpos \- Returns location of a substring within another string
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 strpos:long(s1:string,s2:string)
36 .fi
37 .SH "ARGUMENTS"
38 .PP
39 \fIs1\fR
40 .RS 4
41 string to search in
42 .RE
43 .PP
44 \fIs2\fR
45 .RS 4
46 substring to find
47 .RE
48 .SH "DESCRIPTION"
49 .PP
50 This function returns location of the first occurence of string
51 \fIs2\fR
52 within
53 \fIs1\fR, namely the return value is 0 in case
54 \fIs2\fR
55 is a prefix of
56 \fIs1\fR\&. If
57 \fIs2\fR
58 is not a substring of
59 \fIs1\fR, then the return value is \-1\&.
60 .SH SEE ALSO\n
61 .IR tapset::string (3stap)