ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
StringReader.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Gettext\Utils
;
4
5
class
StringReader
6
{
7
public
$pos
;
8
public
$str
;
9
public
$strlen
;
10
16
public
function
__construct
(
$str
)
17
{
18
$this->
str
=
$str
;
19
$this->strlen = strlen($this->
str
);
20
}
21
29
public
function
read
($bytes)
30
{
31
$data
= substr($this->
str
, $this->pos, $bytes);
32
33
$this->
seekto
($this->pos + $bytes);
34
35
return
$data
;
36
}
37
45
public
function
seekto
(
$pos
)
46
{
47
$this->pos = ($this->strlen <
$pos
) ? $this->strlen :
$pos
;
48
49
return
$this->pos
;
50
}
51
}
Gettext\Utils\StringReader\seekto
seekto($pos)
Move the cursor to a specific position.
Definition:
StringReader.php:45
Gettext\Utils\StringReader\__construct
__construct($str)
Constructor.
Definition:
StringReader.php:16
Gettext\Utils
Definition:
FunctionsScanner.php:3
Gettext\Utils\StringReader\read
read($bytes)
Read and returns a part of the string.
Definition:
StringReader.php:29
$data
$data
Definition:
test-settings.sample.php:14
Gettext\Utils\StringReader\$pos
$pos
Definition:
StringReader.php:7
GuzzleHttp\Psr7\str
str(MessageInterface $message)
Returns the string representation of an HTTP message.
Definition:
functions.php:18
Gettext\Utils\StringReader\$strlen
$strlen
Definition:
StringReader.php:9
Gettext\Utils\StringReader\$str
$str
Definition:
StringReader.php:8
Gettext\Utils\StringReader
Definition:
StringReader.php:5
libs
composer
vendor
gettext
gettext
src
Utils
StringReader.php
Generated on Sat Jan 18 2025 19:01:04 for ILIAS by
1.8.13 (using
Doxyfile
)