Skip to content

hiroy/clover-text-ltsv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text-LTSV

Build Status

Labeled Tab-separated Values (LTSV; cf. http://ltsv.org/) parser for PHP.

Install

Using Composer as a dependency management tool, you can bring Clover\Text\LTSV in your environment easily with settings below.

{
  "require": {
    "clover/text-ltsv": "~1.0"
  }
}

Usage

<?php
$ltsv = new Clover\Text\LTSV();

$values = $ltsv->parseLine("hoge:foo\tbar:baz");

$values = $ltsv->parseFile('log.ltsv');

$it = $ltsv->getIteratorFromFile('log.ltsv');
foreach ($it as $values) {
    // do something
}

$ltsv->add('hoge', 'foo')->add('bar', 'baz');
$line = $ltsv->toLine();

License

Free to use under the terms of the New BSD License.

About

Labeled Tab-separated Values (LTSV; cf. http://ltsv.org/) parser for PHP.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages