Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!
Strony WWWSerwery VPSDomenyHostingDarmowy Hosting CBA.pl

Laravel News: Twine: String Manipulation, Leveled Up

Laravel News: Twine: String Manipulation, Leveled Up

On the Laravel News site there’s a post spotlighting an interesting string manipulation library (Twine) and some of its basica features and use.

Twine is a stand-alone PHP 7 package by Chris Kankiewicz for string manipulation and comparison with an expressive fluid syntax.

They provide several code examples showing the package in action:

  • adding padding to the left/right
  • uppercase/lowercase
  • starts with/contains/ends with
  • converting the string to a hash
  • basic string formatting

The package also makes use of a fluent interface, making it easier to stack multiple operations onto a string (like checking to see if a substring equals a value). You can find out more about the package on its GitHub repository.

Source: http://www.phpdeveloper.org/news/26355

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Posted Lipiec 12th, 2018 in WEB and PHP Development.

Leave a response: