Crypt_GPG
[ class tree: Crypt_GPG ] [ index: Crypt_GPG ] [ all elements ]

Class: Crypt_GPG_ByteUtils

Source Location: /Crypt_GPG-1.4.0b4/Crypt/GPG/ByteUtils.php

Class Overview


A class for performing byte-wise string operations


Author(s):

Copyright:

  • 2013 silverorange

Methods


Inherited Variables

Inherited Methods


Class Details

[line 53]
A class for performing byte-wise string operations

GPG I/O streams are managed using bytes rather than characters. This class requires the mbstring extension to be available.



[ Top ]


Method Detail

strlen   [line 66]

integer strlen( string $string)

Gets the length of a string in bytes

This is used for stream-based communication with the GPG subprocess.

  • Return: the length of the string in bytes.
  • Access: public

Parameters:

string   $string     the string for which to get the length.

[ Top ]

substr   [line 87]

string substr( string $string, integer $start, [integer $length = null])

Gets the substring of a string in bytes

This is used for stream-based communication with the GPG subprocess.

  • Return: the extracted part of the string. Unlike the default PHP substr() function, the returned value is always a string and never false.
  • Access: public

Parameters:

string   $string     the input string.
integer   $start     the starting point at which to get the substring.
integer   $length     optional. The length of the substring.

[ Top ]


Documentation generated on Wed, 13 Mar 2013 18:30:04 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.