A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.cfengine.com/latest/reference-functions-string_head.html below:

string_head - CFEngine 3.26 Docs

Prototype: string_head(data, max)

Return type: string

Description: Returns the first max bytes of data.

If max is negative, then everything but the last max bytes is returned.

Arguments:

Example:

code

body common control
{
      bundlesequence => { "example" };
}

bundle agent example
{
  vars:
      "start" string => string_head("abc", "1"); # will contain "a"
  reports:
      "start of abc = $(start)";

}

Output:

History: Introduced in CFEngine 3.6

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4