打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Find - Function Summary

Find - Function Summary

Summary:

Finds a value in a series and returns the series at the start of it.

Usage:

find series value

Arguments:

series - The series argument. (must be: series port bitset) 

value - The value argument. (must be: any-type) 

Refinements:

/part - Limits the search to a given length or position. 

range - The range argument. (must be: number series port) 

/only - Treats a series value as a single value. 

/case - Characters are case-sensitive. 

/any - Enables the * and ? wildcards. 

/with - Allows custom wildcards. 

wild - Specifies alternates for * and ? (must be: string) 

/skip - Treat the series as records of fixed size 

size - The size argument. (must be: integer) 

/match - Performs comparison and returns the tail of the match. 

/tail - Returns the end of the string. 

/last - Backwards from end of string. 

/reverse - Backwards from the current position. 

Description:

Returns NONE if the value was not found. Otherwise, returns a position in the series where the value was found. Many refinements to this function are available. 

/TAIL indicates that the position just past the match should be returned. 

The /MATCH refinement can be used to perform a character by character match of the input value to the series. The position just past the match is returned. 

Wildcards can be specified with /ANY and case sensitive comparisons can be made with /CASE. 

The /ONLY refinement applies to block values and is ignored for strings. 

The /LAST refinement causes FIND to search from the TAIL of the series toward the HEAD. 

/REVERSE searches backwards from the current position toward the head. 

    probe find "here and now" "and"

    "and now"

    probe find/tail "here and now" "and"

    " now"

    probe find [12:30 123 c@d.com] 123

    [123 c@d.com]

    probe find [1 2 3 4] 5

    none

    probe find/match "here and now" "here"

    " and now"

    probe find/match "now and here" "here"

    none

    probe find [1 2 3 4 3 2 1] 2

    [2 3 4 3 2 1]

    probe find/last %file.fred.txt "."

    %.txt

    probe find/last [1 2 3 4 3 2 1] 2

    [2 1]

    probe find/any "here is a string" "s?r"

    "string"

Related:

pick - Returns the value at the specified position in a series.

select - Finds a value in the series and returns the value or series after it.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Variable handling Functions
Clive Page博士的Fortran 资源
php常用正则
Lua Generic Call
Chris Smith‘s completely unique view : F# in 20 Minutes – Part II
dojox.widget.DataPresentation
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服