<commit_before>.. index::
   single: string

.. _string:

string
------

The ``string`` type is used for strings of text.  It may contain
Unicode characters.

.. language_specific::
   --Python
   In Python, "string" is analogous to the ``unicode`` type on Python
   2.x, and the ``str`` type on Python 3.x.
   --Ruby
   In Ruby, "string" is analogous to the ``String`` type.

.. schema_example::

    { "type": "string" }
    --
    "This is a string"
    --
    // Unicode characters:
    "<NAME>"
    --
    "42"
    --X
    42

.. index::
   single: string; length
   single: maxLength
   single: minLength

Length<commit_msg>Add empty string in list of valid string example.<commit_after>.. index::
   single: string

.. _string:

string
------

The ``string`` type is used for strings of text.  It may contain
Unicode characters.

.. language_specific::
   --Python
   In Python, "string" is analogous to the ``unicode`` type on Python
   2.x, and the ``str`` type on Python 3.x.
   --Ruby
   In Ruby, "string" is analogous to the ``String`` type.

.. schema_example::

    { "type": "string" }
    --
    "This is a string"
    --
    // Unicode characters:
    "<NAME>"
    --
    ""
    --
    "42"
    --X
    42

.. index::
   single: string; length
   single: maxLength
   single: minLength

Length
{'fraction_non_alphanumeric': 0.14427480916030536, 'fraction_numerical': 0.00916030534351145, 'mean_word_length': 2.1820388349514563, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7192087', 'n_tokens_mistral': 439, 'n_tokens_neox': 420, 'n_words': 153}