الگو:Str find/doc
از اسلامشناسان
کنشهای بیشتر
خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
Usage
{{Str find|text|sub_string}}
Returns the position of first appearance of sub_string in text.
- The comparison is case sensitive.
- Returns -1 if sub_string not found
- Character position is 1 based (not 0 based as usual in calculations).
- If sub_string is empty, this routine returns 1. This case will often have to be handled specially.
Examples
In the examples, the string to be searched is :
Abcdefghijklm
- A; خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
- a; خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
- def; خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
- klm; خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
- zyx; خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
- empty;klm;خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
- empty;empty; خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly error report for this template.
TemplateData for Str find
A template to find the numeric position of first appearance of ''sub_string'' in ''text''
| پارامتر | توضیحات | نوع | وضعیت | |
|---|---|---|---|---|
| Text | 1 | The text to search within | رشته | ضروری |
| Sub_string | 2 | The string to be searched within the text | رشته | ضروری |
See also
خطای لوا: روند نتوانست ایجاد شود: proc_open(/dev/null): Failed to open stream: Operation not permitted