33Tools for modifying strings.
44
55
6- ## # Requires
6+ ## Requires
7+
78* PHP >= 5.4
89* [ (MODX)EvolutionCMS] ( https://github.com/evolution-cms/evolution ) >= 1.1
910* [ (MODX)EvolutionCMS.libraries.ddTools] ( http://code.divandesign.biz/modx/ddtools ) >= 0.27
1011* [ (MODX)EvolutionCMS.snippets.ddTypograph] ( https://code.divandesign.biz/modx/ddtypograph ) >= 2.4 (if the ` typography ` parameter is used)
1112* [ PHP.libraries.Parsedown] ( https://github.com/erusev/parsedown ) >= 1.8.0-beta-7 (contains in archive)
1213
1314
14- ## # Documentation
15+ ## Documentation
16+
17+
18+ ### Installation
19+
1520
21+ #### 1. Elements → Snippets: Create a new snippet with the following data
1622
17- ### ## Installation
18- 1 . Elements → Snippets: Create a new snippet with the following data:
19- 1. Snippet name: `ddStringTools`.
20- 2. Description: `<b>1.3</b> Tools for modifying strings.`.
21- 3. Category: `Core`.
22- 4. Parse DocBlock: `no`.
23- 5. Snippet code (php): Insert content of the `ddStringTools_snippet.php` file from the archive.
24- 2 . Elements → Manage Files:
25- 1. Create a new folder `assets/snippets/ddStringTools/`.
26- 2. Extract the archive to the folder (except `ddStringTools_snippet.php`).
23+ 1 . Snippet name: ` ddStringTools ` .
24+ 2 . Description: ` <b>1.4</b> Tools for modifying strings. ` .
25+ 3 . Category: ` Core ` .
26+ 4 . Parse DocBlock: ` no ` .
27+ 5 . Snippet code (php): Insert content of the ` ddStringTools_snippet.php ` file from the archive.
2728
29+ #### 2. Elements → Manage Files:
2830
29- ### ## Parameters description
31+ 1 . Create a new folder ` assets/snippets/ddStringTools/ ` .
32+ 2 . Extract the archive to the folder (except ` ddStringTools_snippet.php ` ).
33+
34+
35+ ### Parameters description
3036
3137* ` inputString `
3238 * Desctription: The input string.
@@ -87,8 +93,8 @@ Tools for modifying strings.
8793 * `1`
8894 * Default value: `0`
8995
90- * ` URLEncode `
91- * Desctription: URL-encode according to RFC 3986 .
96+ * ` removePlaceholders `
97+ * Desctription: Remove placeholders like `[+placeholder+]` .
9298 * Valid values:
9399 * `0`
94100 * `1`
@@ -100,12 +106,19 @@ Tools for modifying strings.
100106 * `0`
101107 * `1`
102108 * Default value: `0`
109+
110+ * ` URLEncode `
111+ * Desctription: URL-encode according to RFC 3986.
112+ * Valid values:
113+ * `0`
114+ * `1`
115+ * Default value: `0`
103116
104117
105- ### ## Examples
118+ ### Examples
106119
107120
108- #### ### Convert characters to lowercase
121+ #### Convert characters to lowercase
109122
110123```
111124[[ddStringTools?
@@ -121,7 +134,7 @@ some string with different case
121134```
122135
123136
124- #### ### Strip HTML and PHP tags from a string excluding ` <p> ` и ` <a> `
137+ #### Strip HTML and PHP tags from a string excluding ` <p> ` и ` <a> `
125138
126139``` html
127140[[ddStringTools?
@@ -138,7 +151,7 @@ Returns
138151```
139152
140153
141- #### ### Convert special characters to HTML entities
154+ #### Convert special characters to HTML entities
142155
143156``` html
144157[[ddStringTools?
@@ -154,7 +167,7 @@ Returns
154167```
155168
156169
157- #### ### URL-encode according to RFC 3986
170+ #### URL-encode according to RFC 3986
158171
159172```
160173[[ddStringTools?
@@ -170,7 +183,7 @@ tags%5B%5D%3DMaps%26tags%5B%5D%3DURLs
170183```
171184
172185
173- #### ### Escape special characters for JavaScript
186+ #### Escape special characters for JavaScript
174187
175188``` html
176189<script >
@@ -193,7 +206,7 @@ Returns
193206` ` `
194207
195208
196- #### ### Convert Markdown to HTML
209+ #### Convert Markdown to HTML
197210
198211` ` `
199212[[ddStringTools?
@@ -214,7 +227,7 @@ Returns
214227` ` `
215228
216229
217- #### ### Typography text with optical alignment
230+ #### Typography text with optical alignment
218231
219232` ` ` html
220233[[ddStringTools?
@@ -233,4 +246,23 @@ Returns
233246` ` `
234247
235248
236- ## # [Home page →](http://code.divandesign.biz/modx/ddstringtools)
249+ #### Remove placeholders like ` [+ placeholder+ ]`
250+
251+ ` ` ` html
252+ [[ddStringTools?
253+ & inputString= ` Some [+thing+] with [+placeholder1+] and [+placeholder2+].`
254+ & removePlaceholders= ` 1`
255+ ]]
256+ ` ` `
257+
258+ Returns
259+
260+ ` ` ` html
261+ Some with and .
262+ ` ` `
263+
264+
265+ ## [Home page →](http://code.divandesign.biz/modx/ddstringtools)
266+
267+
268+ <link rel="stylesheet" type="text/css" href="https://DivanDesign.ru/assets/files/ddMarkdown.css" />
0 commit comments