Download the PHP package danielstjules/sliceable-stringy without Composer

On this page you can find all versions of the php package danielstjules/sliceable-stringy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sliceable-stringy

SliceableStringy

Python string slices in PHP. The class extends Stringy, and implements the ArrayAccess interface.

Build Status

Installation

If you're using Composer to manage dependencies, you can include the following in your composer.json file:

Then, after running composer update or php composer.phar update, you can load the class using Composer's autoloader:

Overview

SliceableStringy returns a slice when passed a string offset containing one or more colons. Up to 3 arguments may be passed: 'start:stop:step'. Start, which indicates the starting index of the slice, defaults to the first character in the string if step is positive, and the last character if negative. Stop, which indicates the exclusive boundary of the range, defaults to the length of the string if step is positive, and before the first character if negative. And step allows the user to include only every nth character in the result, with its sign determining the direction in which indices are sampled.

Just like Stringy, SliceableStringy is immutable and returns a new instance with each slice.

Examples

Specific offset

Using start and stop

Negative indices

Passing a step

Possible exceptions

Implementation Fidelity

A number of specs in spec/SliceableStringySpec.php assert that the library mimics Python's native slice notation. On top of the handful of unit tests, spec/fixtures/resultGenerator.py has been used to generate test fixtures. Each of the slices in expectedResults.csv are checked against SliceableStringy to ensure correct functionality.

TL;DR

Butchering two languages with a single library.


All versions of sliceable-stringy with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
danielstjules/stringy Version 1.4.x
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package danielstjules/sliceable-stringy contains the following files

Loading the files please wait ....