Chomp - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


StringTools

  

Chomp

  

remove line endings from a string

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Chomp( s )

Parameters

s

-

Maple string

Description

• 

The Chomp(s) command returns a copy of input string s with the line endings removed (if any).

  

Note: This function is similar to the Perl function of the same name.

• 

Compare with the related procedure StringTools[Chop].

• 

All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters.  Thus, there is no support for multibyte character encodings, such as unicode encodings.

Examples

withStringTools:

ChompThis is a test. \n

This is a test.

(1)

See Also

string

StringTools

StringTools[Chop]

StringTools[Trim]