You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h1>Welcome to Python String Utils’s documentation!<aclass="headerlink" href="#welcome-to-python-string-utils-s-documentation" title="Permalink to this headline">¶</a></h1>
<h1>string_utils documentation<aclass="headerlink" href="#string-utils-documentation" title="Permalink to this headline">¶</a></h1>
135
135
<p>Contents:</p>
136
136
<divclass="toctree-wrapper compound">
137
137
</div>
@@ -420,6 +420,27 @@ <h1>Welcome to Python String Utils’s documentation!<a class="headerlink" h
420
420
</table>
421
421
</dd></dl>
422
422
423
+
<dlclass="function">
424
+
<dtid="string_utils.is_slug">
425
+
<codeclass="descclassname">string_utils.</code><codeclass="descname">is_slug</code><spanclass="sig-paren">(</span><em>string</em>, <em>sign='-'</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#string_utils.is_slug" title="Permalink to this definition">¶</a></dt>
<li><strong>string</strong> (<em>str</em>) – String to check.</li>
433
+
<li><strong>sign</strong> (<em>str</em>) – Join sign used by the slug.</li>
434
+
</ul>
435
+
</td>
436
+
</tr>
437
+
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first last">True if slug, false otherwise.</p>
438
+
</td>
439
+
</tr>
440
+
</tbody>
441
+
</table>
442
+
</dd></dl>
443
+
423
444
<dlclass="function">
424
445
<dtid="string_utils.words_count">
425
446
<codeclass="descclassname">string_utils.</code><codeclass="descname">words_count</code><spanclass="sig-paren">(</span><em>string</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#string_utils.words_count" title="Permalink to this definition">¶</a></dt>
@@ -596,7 +617,7 @@ <h1>Welcome to Python String Utils’s documentation!<a class="headerlink" h
596
617
<ulclass="simple">
597
618
<li>String cannot start or end with spaces</li>
598
619
<li>String cannot have multiple sequential spaces, empty lines or punctuation (except for ”?”, ”!” and ”.”)</li>
599
-
<li>Arithmetic operators (“+”, “-”, “/”, “*”, “=”) must have one, and only one space before and after themselves</li>
620
+
<li>Arithmetic operators (+, -, /, *, =) must have one, and only one space before and after themselves</li>
600
621
<li>The first letter after a dot, an exclamation or a question mark must be uppercase</li>
601
622
<li>One, and only one space should follow a dot, an exclamation or a question mark</li>
602
623
<li>Text inside double quotes cannot start or end with spaces, but one, and only one space must come first and after quotes (foo” bar”baz -> foo “bar” baz)</li>
@@ -618,6 +639,28 @@ <h1>Welcome to Python String Utils’s documentation!<a class="headerlink" h
618
639
</table>
619
640
</dd></dl>
620
641
642
+
<dlclass="function">
643
+
<dtid="string_utils.slugify">
644
+
<codeclass="descclassname">string_utils.</code><codeclass="descname">slugify</code><spanclass="sig-paren">(</span><em>string</em>, <em>sign='-'</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#string_utils.slugify" title="Permalink to this definition">¶</a></dt>
645
+
<dd><p>Converts a string into a slug using provided join sign.
646
+
(<strong>(This Is A “Test”!)</strong> -> <strong>this-is-a-test</strong>)</p>
0 commit comments