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
function trim(str, charlist) { | |
// example 1: trim(' Kevin van Zonneveld ') | |
// returns 1: 'Kevin van Zonneveld' | |
// example 2: trim('Hello World', 'Hdle') | |
// returns 2: 'o Wor' | |
// example 3: trim(16, 1) | |
// returns 3: '6' | |
let whitespace = [ | |
' ', |
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
const fs = require('fs'); | |
const path = require('path'); | |
const exec = require('child_process').exec; | |
let dlePath = '/path/to/dle'; | |
let index = 0; | |
let tmpFile = process.cwd() + '/tmp.php'; | |
function readDirRecursively(dir) { | |
let files = []; |
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
<?php | |
if (!function_exists('str_slug')) { | |
function str_slug($title, $separator = '-') | |
{ | |
$charsArray = [ | |
'0' => ['°', '₀', '۰'], | |
'1' => ['¹', '₁', '۱'], | |
'2' => ['²', '₂', '۲'], | |
'3' => ['³', '₃', '۳'], | |
'4' => ['⁴', '₄', '۴', '٤'], |