Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions benchmarks/lib/AppendAndPrependBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@

class AppendAndPrependBench
{
public function bench_ensure_left_Str() {
(new Str('2'))->ensureLeft('1');
}

public function bench_ensure_left_Stringy() {
(new Stringy('2'))->ensureLeft('1');
}

public function bench_ensure_right_Str() {
(new Str('2'))->ensureRight('1');
}

public function bench_ensure_right_Stringy() {
(new Stringy('2'))->ensureRight('1');
}

public function bench_append_Str() {
(new Str('2'))->append('1');
}
Expand All @@ -38,37 +22,4 @@ public function bench_prepend_Str() {
public function bench_prepend_Stringy() {
(new Stringy('2'))->prepend('1');
}

public function bench_remove_left_Str() {
(new Str('12'))->removeLeft('1');
}

public function bench_remove_left_Stringy() {
(new Stringy('12'))->removeLeft('1');
}

public function bench_remove_right_Str() {
(new Str('21'))->removeRight('1');
}

public function bench_remove_right_Stringy()
{
(new Stringy('21'))->removeRight('1');
}

public function bench_insert_Str() {
(new Str('226198'))->insert('1', 4);
}

public function bench_insert_Stringy() {
(new Stringy('226198'))->insert('1', 4);
}

public function bench_surround_Str() {
(new Str('2'))->surround('1');
}

public function bench_surround_Stringy() {
(new Stringy('2'))->surround('1');
}
}
33 changes: 0 additions & 33 deletions benchmarks/lib/ArrayBench.php

This file was deleted.

25 changes: 25 additions & 0 deletions benchmarks/lib/AtAndBetweenBench.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Benchmark;

use Str\Str;
use Stringy\Stringy;

class AtAndBetweenBench
{
public function bench_between_Str() {
(new Str(' hello world '))->between(2, 4);
}

public function bench_between_Stringy() {
(new Stringy(' hello world '))->between(2, 4);
}

public function bench_at_Str() {
(new Str(' hello world '))->at(2);
}

public function bench_at_Stringy() {
(new Stringy(' hello world '))->at(2);
}
}
65 changes: 0 additions & 65 deletions benchmarks/lib/BooleansBench.php

This file was deleted.

25 changes: 25 additions & 0 deletions benchmarks/lib/CamelCaseBench.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Benchmark;

use Str\Str;
use Stringy\Stringy;

class CamelCaseBench
{
public function bench_upper_camelize_Str() {
(new Str('some string hello'))->upperCamelize();
}

public function bench_upper_camelize_Stringy() {
(new Stringy('some string hello'))->upperCamelize();
}

public function bench_camelize_Str() {
(new Str('some string hello'))->camelize();
}

public function bench_camelize_Stringy() {
(new Stringy('some string hello'))->camelize();
}
}
81 changes: 0 additions & 81 deletions benchmarks/lib/CaseTogglingBench.php

This file was deleted.

17 changes: 17 additions & 0 deletions benchmarks/lib/CharsBench.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Benchmark;

use Str\Str;
use Stringy\Stringy;

class CharsBench
{
public function bench_chars_Str() {
(new Str('Hello world'))->chars();
}

public function bench_chars_Stringy() {
(new Stringy('Hello world'))->chars();
}
}
20 changes: 2 additions & 18 deletions benchmarks/lib/CountAndLengthBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,11 @@ public function bench_length_Stringy() {
(new Stringy('Hello world'))->length();
}

public function bench_indexOf_Str() {
(new Str('Hello world'))->indexOf('l');
}

public function bench_indexOf_Stringy() {
(new Stringy('Hello world'))->indexOf('l');
}

public function bench_indexOfLast_Str() {
(new Str('Hello world'))->indexOfLast('l');
}

public function bench_indexOfLast_Stringy() {
(new Stringy('Hello world'))->indexOfLast('l');
}

public function bench_count_Str() {
public function bench_count_substr_Str() {
(new Str('HelLo wOrld'))->countSubstr('l', false);
}

public function bench_count_Stringy() {
public function bench_count_substr_Stringy() {
(new Stringy('HelLo wOrld'))->countSubstr('l', false);
}
}
33 changes: 33 additions & 0 deletions benchmarks/lib/DelimitersBench.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Benchmark;

use Str\Str;
use Stringy\Stringy;

class DelimitersBench
{
public function bench_underscored_Str() {
(new Str(' hello world '))->underscored();
}

public function bench_underscored_Stringy() {
(new Stringy(' hello world '))->underscored();
}

public function bench_delimit_Str() {
(new Str(' hello world '))->delimit('()');
}

public function bench_delimit_Stringy() {
(new Stringy(' hello world '))->delimit('()');
}

public function bench_dasherize_Str() {
(new Str(' hello world '))->dasherize();
}

public function bench_dasherize_Stringy() {
(new Stringy(' hello world '))->dasherize();
}
}
Loading