Movatterモバイル変換


[0]ホーム

URL:


CFEngine documentation homepage

string_tail

Suggest changes
Table of contents

Prototype:string_tail(data, max)

Return type:string

Description: Returns the lastmax bytes ofdata.

Ifmax is negative, then everything but the firstmax bytes is returned.

Arguments:

  • data:string - Input string - in the range:.*
  • max:int - Maximum number of characters to return - in the range:-99999999999,99999999999

Example:

code
bodycommoncontrol{bundlesequence=>{"example"};}bundleagentexample{vars:"end"string=>string_tail("abc","1");# will contain "c"reports:"end of abc =$(end)";}

Output:

code
R: end of abc = c

History: Introduced in CFEngine 3.6

See also:string_head(),string_length(),string_reverse().

Still need help?

Chat Ask a question on Github Mailing list
Version 
master3.24 (LTS)3.21 (LTS)view all versions

[8]ページ先頭

©2009-2025 Movatter.jp