RSyslog Documentation

ltrim() / rtrim()

Purpose

ltrim

ltrim(str)

Removes any spaces at the start of a given string. Input is a string, output is the same string starting with the first non-space character.

rtrim

rtrim(str)

Removes any spaces at the end of a given string. Input is a string, output is the same string ending with the last non-space character.

Example

ltrim

In the following example the spaces at the beginning of the string are removed.

ltrim("   str ")

produces

"str "

rtrim

In the following example the spaces at the end of the string are removed.

rtrim("   str ")

produces

"   str"

See also

Help with configuring/using Rsyslog:

  • Mailing list - best route for general questions
  • GitHub: rsyslog source project - detailed questions, reporting issues that are believed to be bugs with Rsyslog
  • Stack Exchange (View, Ask) - experimental support from rsyslog community

See also

Contributing to Rsyslog:

© 2008-2019, `Rainer Gerhards and Others. This site uses the “better” theme for Sphinx.
Scroll to top