Query_Lang-SystemFunctions_System_PosPos_AD

現在、バージョン 19. をご覧頂いています。最新情報については、バージョン Query_Lang-SystemFunctions_System_Pos((Pos))_AD の 21 をご覧ください。

Parent page: System Query Functions - System Functions

Summary

Returns the index value of the first character in a specified substring that occurs in a given string.

Syntax

Pos(Substr : String , S : String) : Integer

Pos searches for a substring, Substr, within a string, S. Substr and S are string-type expressions. An integer value is returned that is the index of the first character of Substr.

Pos is case-sensitive. If Substr is not found, Pos returns zero.

Example Usage

Pos('T',Name) = 1
Returns all objects that have a Name property whose associated string first contains 'T' at its first position; 'T1' and 'Time Table' are examples of such strings. ('T' is located twice within the string 'Time Table', but the first location of this is at its first position.)

Pos('A',Name) = 2
Returns all objects that have a Name property whose associated string first contains 'A' at its second position; 'RA1' and 'CABLE CHART' are examples of such strings.

Pos('B',Name) = 0
Returns all objects that have a Name property whose associated string does not contain 'B' at any position; 'D1' and 'Time Table' are examples of such strings. (The string of 'Time Table' contains 'b' at its eighth position, but Pos is case-sensitive.)

Pos('D',Name) > 0
Returns all objects that have a Name property whose associated string contains 'D' at at least one position and at any location(s); 'Data Chart', 'U1D', and 'Install either D1 and D2 or D3 and D4, but never install all of these.' are examples of such strings.

Pos('Con',Name) = 1
Returns all objects that have a Name property whose associated string first contains 'Con' at its first, second, and third positions; 'Concatenate' is an example of a such string. (The first location of 'Con' within 'Concatenate' is the first three characters of this; the first character within 'Con' is 'C', and its location is the first character of 'Concatenate'.)

Pos('ate',Name) = 5
Returns all objects that have a Name property whose associated string first contains 'ate' at its fifth, sixth, and seventh positions; 'Concatenate' is an example of a such string. (The first location of 'ate' within 'Concatenate' is the fifth through to seventh characters of this; the first character within 'ate' is 'a', and its location is the fifth character of 'Concatenate'.)

Pos('ate',Name) = 0
Returns all objects that have a Name property whose associated string does not contain 'ate' anywhere; 'C1' and 'TIME:' are examples of such strings.

 

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
注記

利用できる機能は、Altium 製品のアクセスレベルによって異なります。Altium Designer ソフトウェア サブスクリプション の様々なレベルに含まれる機能と、Altium 365 プラットフォーム で提供されるアプリケーションを通じて提供される機能を比較してください。

ソフトウェアの機能が見つからない場合は、Altium の営業担当者に連絡して 詳細を確認してください。