sidspears/string-search

Find substring in file

v1.0.1 2018-11-18 17:17 UTC

This package is auto-updated.

Last update: 2024-04-19 09:50:38 UTC


README

composer require sidspears/string-search

Testing

Install PHPUnit

composer require --dev phpunit/phpunit ^7

Run tests

./vendor/bin/phpunit --bootstrap vendor/autoload.php vendor/sidspears/string-search/tests/

Usage example

<?php
require_once('vendor/autoload.php');
use SidSpears\StringSearcher\StringSearcher;

$stringSearcher = new StringSearcher('config.yaml');
$result = $stringSearcher->findStringAndPosition('file.txt', 'textToFind');

print_r($result);