Spec-Zone.ru › ColdFusion

find

Finds the first occurrence of a substring in a string, from a specified start position. If substring is not in string, returns zero. The search is case-sensitive.

find(substring, string [, start]) → returns numeric

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: findNoCase reFind

    Argument Reference

    substring string
    Required

    The string you are looking for.

    string string
    Required

    The string to search in.

    start numeric
    Default: 1

    The position from which to start searching in the string

    Examples
    Sample code invoking the find function

    Find apple in the string

    Returns the index of apple in the string.

    find("apple", "An apple a day keeps the doctor away.")

    Expected Result: 4

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/find

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API