फलकम्:Str find

अधि विकिपीडिया, एकः स्वतन्त्रविश्वविज्ञानकोश
अत्र गम्यताम् : सञ्चरणम्, अन्वेषणम्


Documentation icon Template documentation[view] [edit] [history] [purge]


{{Str find|text|sub_string}} = Position of first appearance of sub_string in text.

  • Only searches first 50 characters of text. Returns -1 if sub_string not found in first 50 characters.
  • Character position is 1 based (not 0 based as usual in calculations).
  • Warning: if sub_string is empty, then this routine will return 1 !!! This case will often have to be handled specially.

See also[सम्पादयतु]

Template:Strfind short can handle longer strings (<99 chars), and gives far better performance, especially for short strings.

फलकम्:String templates see also

"https://sa.wikipedia.org/w/index.php?title=फलकम्:Str_find&oldid=191660" इत्यस्माद् पुनः प्राप्तिः