GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NO::WORRIES::STRING (3)

.ds Aq ’

NAME

No::Worries::String - string handling without worries

CONTENTS

SYNOPSIS



  use No::Worries::String qw(string_escape string_table string_trim);

  # escape a string
  printf("found %s\n", string_escape($data));

  # format a table
  print(string_table([
      [1, 1,  1],
      [2, 4,  8],
      [3, 9, 27],
  ], header => [qw(x x^2 x^3)]));

  # trim a string
  $string = string_trim($input);



DESCRIPTION

This module eases string handling by providing convenient string manipulation functions.

FUNCTIONS

This module provides the following functions (none of them being exported by default):
string_escape(STRING) return a new string with all potentially non-printable characters escaped; this includes ASCII control characters, non-7bit ASCII and Unicode characters
string_table(TABLE[, OPTIONS]) transform the given table (a reference to an array of arrays of strings) into a formatted multi-line string; supported options:
o colsep: column separator string (default: | )
o header: array reference of column headers (default: none)
o headsep: header separator (default: =)
o indent: string to prepend to each line (default: "")
string_trim(STRING) return a new string with leading and trailing spaces removed

SEE ALSO

No::Worries.

AUTHOR

Lionel Cons <http://cern.ch/lionel.cons>

Copyright (C) CERN 2012-2013

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NO::WORRIES::STRING (3) 2013-05-21

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.