-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some more function implemented and docs files updated
- Loading branch information
1 parent
03b1a63
commit aec8226
Showing
12 changed files
with
1,271 additions
and
977 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# After | ||
|
||
### Example#1 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const jstr = new JStr("\\App\\Http\\Controllers\\Controller"); | ||
const result = jstr.afterLast("\\"); | ||
console.log(result); // Outputs: 'Controller' | ||
``` | ||
|
||
### Example#2 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const result = JStr.of("abc123abc456abc789").afterLast("abc"); | ||
|
||
console.log(result); // Outputs: '789' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Before | ||
|
||
### Example#1 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const jstr = new JStr("\\App\\Http\\Controllers\\Controller"); | ||
const result = jstr.beforeLast("\\"); | ||
console.log(result); // Outputs: '\\App\\Http\\Controllers' | ||
``` | ||
|
||
### Example#2 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const result = JStr.of("abc123abc456abc789").afterLast("abc"); | ||
console.log(result); // Outputs: 'abc123abc456' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Before | ||
|
||
### Example#1 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const jstr = new JStr("The big lion and many fox fights each other for food"); | ||
const result = jstr.between("big", "fights"); | ||
console.log(result); // Outputs: 'lion and many fox' | ||
``` | ||
|
||
### Example#2 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const result = JStr.of( | ||
"The big lion and many fox fights each other for food" | ||
).before("name", "lion"); | ||
|
||
console.log(result); // Outputs: '' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
# Contains | ||
|
||
### Example#1 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const jstr = new JStr("Hello world"); | ||
const result = jstr.contains("world"); | ||
console.log(result); // Outputs: 'true' | ||
``` | ||
|
||
### Example#2 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const result = JStr.of("This is my name").contains("my name"); | ||
|
||
console.log(result); // Outputs: 'true' | ||
``` | ||
|
||
### Example#3 | ||
|
||
```javascript | ||
import JStr from "@akcybex/jsr"; | ||
|
||
const result = JStr.of( | ||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop" | ||
).contains(["typesetting industry", "of"]); | ||
|
||
console.log(result); // Outputs: 'true' | ||
``` |
Oops, something went wrong.