Introduction

Get a brief introduction to what you’ll learn in this course.

Prerequisites

To fully benefit from this course, it is recommended that learners have basic PHP knowledge, an understanding of Laravel fundamentals, composer and Laravel installation, and command-line interface (CLI).

In addition to this, some basic knowledge of Laravel functions and the process of manipulating strings in Laravel is also required. Basic knowledge of string helper methods can be useful in understanding this course.

About the course

We will cover many topics throughout this course, from working with Unicode character sets and the Laravel helper methods to parsing and splitting complex strings. This course has been arranged such that each topic builds off the concepts that appear before it within the course, but there is no particular recommended order for reading this course.

You are encouraged to find a topic interesting and jump to that section. When doing so, you might find that the discussion references previous items discussed in the course. When this happens, you can continue reading through your selected section. If the examples become challenging, you can return to earlier parts of the course that help build foundational knowledge for your chosen area.

The topics listed below do not include everything each chapter provides and are intended to help give a general idea of what each chapter contains beyond its title. Exploration of this course’s content is encouraged!

What Are Strings? This chapter covers Unicode, UTF-8, the different types of PHP strings, and techniques for iterating multibyte PHP strings.

Fluent Strings: This chapter introduces Laravel’s fluent string helper class, which is used extensively throughout the course.

The Formatting Helper Methods: This chapter covers the Laravel string helper methods that are typically used to format or transform an existing string. Examples include title casing and converting titles to URL slugs.

The Logical Helper Methods: The logical helper methods assist in making decisions about our strings. This chapter covers topics such as determining if an input string contains one or more other strings and checking if our text starts or ends with particular values.

The Construction Helper Methods: The construction helper methods allow us to generate new strings from existing input or to construct pseudo-random strings. The topics in this chapter include replacing substrings using various techniques and ensuring input always ends with a given character sequence.

The Extraction Helper Methods: The extraction helper methods are a set of utility methods that allow us to retrieve parts of existing strings using various techniques. Examples include converting input into a list of words and retrieving the content between two search strings.

Padding Strings: This chapter thoroughly discusses string padding. Topics include simple string padding, advanced methods for number formatting, and more.

String Translations: This chapter discusses the various features Laravel provides to help work with, manage, and manipulate translation strings.

Lines and Words: This chapter focuses on extracting line and column information from the input text and various techniques for extracting and analyzing words. This chapter continues the discussion surrounding lines and words and offers techniques for retrieving adjacent words and characters from arbitrary positions. Additional topics include calculating an estimated reading time and generating initialisms from input text.

Applied Techniques: Writing a Gherkin Parser: This in-depth chapter utilizes techniques discussed in previous chapters to build a Gherkin parser from start to finish.

Markov Chains and Text Generation: This chapter explores generating randomized text using Markov Chains. The discussion includes creating our training methods and implementing a weighted selection algorithm to help generate our text.

Fixed Width Data Parsing: This chapter discusses various techniques for parsing fixed-width data commonly found in exports from financial institutions.

Splitting Strings: This chapter discusses advanced techniques for splitting complicated input text using non-trivial rules and requirements. It concludes with building a general-purpose, reusable cursor system to make extracting information from strings easier.

Applied Techniques—A Blade Directive Validator: This chapter applies most of the techniques covered in the course to implement a simple Blade directive parser and validation system. Validation logic includes detecting when directives are missing required arguments, have inconsistent spacing, or when errant newlines may cause compiler errors.

Working with HTML: This chapter explores techniques for reading and manipulating HTML documents using Symfony framework components. It also examines methods for parsing and analyzing semantically invalid HTML documents, such as those that contain embedded templating languages.

Regular Expressions: This chapter focuses on the most common regular expression features encountered when working on various code bases. Topics include the Laravel pattern-matching methods, negative look-behinds, and a regular expression language primer.

Intended audience

The course is designed for web developers and programmers who have a basic understanding of PHP and are interested in learning how to efficiently work with strings within the Laravel framework. This course suits developers of all skill levels, from beginners new to Laravel to experienced professionals looking to enhance their string manipulation skills.

Press + to interact