BSFL  0.1.0
Bash Shell Function Library
 All Files Functions Variables Groups
Functions
String

Functions

 str_replace (origin, destination, data)
 Replaces some text in a string. More...
 
 str_replace_in_file (origin, destination, file)
 Replaces some text in a file. More...
 
 to_lower (string)
 Converts uppercase characters in a string to lowercase. More...
 
 to_upper (string)
 Converts lowercase characters in a string to uppercase. More...
 
 trim (string)
 Removes whitespace from both ends of a string. More...
 

Detailed Description

Function Documentation

str_replace ( origin  ,
destination  ,
data   
)

Replaces some text in a string.

Parameters
originContent to be matched.
destinationNew content that replaces the matched content.
dataData to operate on.
Returns
The new string after having replaced the matched content with the new one.
str_replace_in_file ( origin  ,
destination  ,
file   
)

Replaces some text in a file.

Parameters
originContent to be matched.
destinationNew content that replaces the matched content.
fileFile to operate on.
Return values
0if the original content has been replaced.
1if an error occurred.
to_lower ( string  )

Converts uppercase characters in a string to lowercase.

Parameters
stringString to operate on.
Returns
Lowercase string.
to_upper ( string  )

Converts lowercase characters in a string to uppercase.

Parameters
stringString to operate on.
Returns
Uppercase string.
trim ( string  )

Removes whitespace from both ends of a string.

Parameters
stringString to operate on.
Returns
The string stripped of whitespace from both ends.