PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.1.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.1.2
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
bit-form / vendor / typisttech / imposter / src / StringUtil.php

StringUtil.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 3.1.2, at vendor/typisttech/imposter/src/StringUtil.php

24 lines 511 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace TypistTech\Imposter;
6
7 class StringUtil
8 {
9 public static function addTrailingSlash(string $string): string
10 {
11 return rtrim($string, '/\\') . '/';
12 }
13
14 public static function ensureDoubleBackwardSlash(string $string): string
15 {
16 $parts = explode('\\', $string);
17 $nonEmptyParts = array_filter($parts, function ($part) {
18 return ! empty($part);
19 });
20
21 return implode('\\\\', $nonEmptyParts) . '\\\\';
22 }
23 }
24