About: API strfind   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Find the first occurrence of the pattern in the string passed. If an instance of the pattern is found a pair of values representing the start and end of the string is returned. If the pattern cannot be found nil is returned. > = string.find("Hello Lua user", "Lua") 7 9 > = string.find("Hello Lua user", "banana") nil We can optionally specify where to start the search with a third argument. The argument may also be negative which means we count back from the end of the string and start the search.

AttributesValues
rdfs:label
  • API strfind
rdfs:comment
  • Find the first occurrence of the pattern in the string passed. If an instance of the pattern is found a pair of values representing the start and end of the string is returned. If the pattern cannot be found nil is returned. > = string.find("Hello Lua user", "Lua") 7 9 > = string.find("Hello Lua user", "banana") nil We can optionally specify where to start the search with a third argument. The argument may also be negative which means we count back from the end of the string and start the search.
dbkwik:wowwiki/pro...iPageUsesTemplate
abstract
  • Find the first occurrence of the pattern in the string passed. If an instance of the pattern is found a pair of values representing the start and end of the string is returned. If the pattern cannot be found nil is returned. > = string.find("Hello Lua user", "Lua") 7 9 > = string.find("Hello Lua user", "banana") nil We can optionally specify where to start the search with a third argument. The argument may also be negative which means we count back from the end of the string and start the search. > = string.find("Hello Lua user", "Lua", 1) -- start at first character 7 9 > = string.find("Hello Lua user", "Lua", 8) -- "Lua" not found again after character 8 nil > = string.find("Hello Lua user", "e", -5) -- first "e" 5 characters from the end 13 13 The pattern argument can be a regular expression which allows more complex searches. See the Patterns Tutorial on Lua-Users.org and Pattern matching for more information. We can turn off the regular expression feature by using the optional fourth argument plain. plain takes a boolean value and must be preceded by init. E.g., > = string.find("Hello Lua user", "%su") -- find a space character followed by "u" 10 11 > = string.find("Hello Lua user", "%su", 1, true) -- turn on plain searches, now not found nil
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software