Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 14, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 14, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 14, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 14, 2025

      I test a lot of AI coding tools, and this stunning new OpenAI release just saved me days of work

      May 14, 2025

      How to use your Android phone as a webcam when your laptop’s default won’t cut it

      May 14, 2025

      The 5 most customizable Linux desktop environments – when you want it your way

      May 14, 2025

      Gen AI use at work saps our motivation even as it boosts productivity, new research shows

      May 14, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Strategic Cloud Partner: Key to Business Success, Not Just Tech

      May 14, 2025
      Recent

      Strategic Cloud Partner: Key to Business Success, Not Just Tech

      May 14, 2025

      Perficient’s “What If? So What?” Podcast Wins Gold at the 2025 Hermes Creative Awards

      May 14, 2025

      PIM for Azure Resources

      May 14, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Windows 11 24H2’s Settings now bundles FAQs section to tell you more about your system

      May 14, 2025
      Recent

      Windows 11 24H2’s Settings now bundles FAQs section to tell you more about your system

      May 14, 2025

      You can now share an app/browser window with Copilot Vision to help you with different tasks

      May 14, 2025

      Microsoft will gradually retire SharePoint Alerts over the next two years

      May 14, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Laravel Advanced String Package

    Laravel Advanced String Package

    July 27, 2024

    Welcome to the first episode of a new “Creator Spotlight” video series where we interview Laravel developers about the things they are creating. Today we talk with Matt Stenson who created a Laravel Advanced String package that adds extra advanced string manipulation methods to the built-in Str class. This package provides extended functionality on strings, such as advanced password generation, data redaction, and more.

    Available Methods

    The String methods this package includes are:

    advPassword

    Generates a random, secure password.

    public static function advPassword(
    $length = 32,
    $letters = true,
    $numbers = true,
    $symbols = true,
    $spaces = false,
    $upperLetters = false,
    $lowerLetters = false,
    $exclude = []
    )

    charWrap

    Wraps a string at a given number of characters regardless of words.

    public static function charWrap(
    $string,
    $length = 80
    )

    emailDomain

    Extracts the domain part of an email address, including subdomains.

    public static function emailDomain(
    $string
    )

    readTime

    Calculates the read time of a string.

    public static function readTime(
    $string,
    $wpm = 200
    )

    redactCreditCard

    Redacts credit card numbers in a string.

    public static function redactCreditCard(
    $string,
    $redacted = ‘********’,
    $exclude = []
    )

    redactSsn

    Redacts Social Security Numbers (SSN) in a string.

    public static function redactSsn(
    $string,
    $redacted = ‘********’,
    $dashes = true,
    $noDashes = true
    )

    splitName

    Splits a full name into first name, middle name (if present), and last name, removing any prefixes and suffixes. This method can handle both “Firstname Lastname” and “Lastname, Firstname” formats.

    public static function splitName(
    $name
    )

    More information

    For more info check out the Github Repo for installation details, API docs, and more.

    The post Laravel Advanced String Package appeared first on Laravel News.

    Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleAdd Comments to your Laravel Application with the Commenter Package
    Next Article Take the Annual State of Laravel 2024 Survey

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 15, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4695 – PHPGurukul Cyber Cafe Management System SQL Injection

    May 15, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Which Clients Matter More: New vs. Existing?

    Development

    Building an organization’s code of conduct

    Web Development

    Un Cambiamento Controverso: Microsoft e il Kernel Linux 6.13

    Linux

    The best advice to bring to work in 2025

    Web Development

    Highlights

    Development

    SASE Threat Report: 8 Key Findings for Enterprise Security

    June 3, 2024

    Threat actors are evolving, yet Cyber Threat Intelligence (CTI) remains confined to each isolated point…

    Xbox is getting the sequel to one of Nintendo Switch’s biggest cult mechaanimehits

    April 4, 2025

    How to Write Clean Code: Refactoring and Best Practices.

    November 18, 2024

    CVE-2025-4112 – PHPGurukul Student Record System SQL Injection Vulnerability

    April 30, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.