# \cge_string

A set of string utility functions.

## Summary

Methods
Properties
Constants
mask_string()
word_limiter()
str_to_bytes()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A
final

File
  lib/class.cge_string.php
Package
  \CGExtensions
Class hierarchy
  \cge_string

## Tags

todo |

## Methods

### mask_string()

    mask_string(string $instr, int $numchars, string $mask) : string

A simple utility function to mask the first N characters of an input string

#### Parameters

string | $instr | The input string
int | $numchars | The number of characters to mask
string | $mask | The mask character

#### Returns

string

#

static

## Tags

todo |

### word_limiter()

    word_limiter(string $str, int $limit, string $end_char) : string

Truncate the input string after N words.

#### Parameters

string | $str | The input string
int | $limit | The word limit
string | $end_char | How to terminate the output string

#### Returns

string

#

static

## Tags

todo |

### str_to_bytes()

    str_to_bytes(string $val) : int

Given an input string in the format of ###[GgMmKk] convert it into a byte count.

Each kilobyte is 1024 butes. Each megabyte is 1024 kilobytes. And each Gigabyte is 1024 megabytes.

#### Parameters

string | $val |

#### Returns

int

#

static

## Tags

todo |

### class.cge_string.php