class_docstr: Extension array for string data.
  
  .. warning::
  
     StringArray is considered experimental. The implementation and
     parts of the API may change without warning.
  
  Parameters
  ----------
  values : array-like
      The array of data.
  
      .. warning::
  
         Currently, this expects an object-dtype ndarray
         where the elements are Python strings
         or nan-likes (``None``, ``np.nan``, ``NA``).
         This may change without warning in the future. Use
         :meth:`pandas.array` with ``dtype="string"`` for a stable way of
         creating a `StringArray` from any sequence.
  
      .. versionchanged:: 1.5.0
  
         StringArray now accepts array-likes containing
         nan-likes(``None``, ``np.nan``) for the ``values`` parameter
         in addition to strings and :attr:`pandas.NA`
  
  copy : bool, default False
      Whether to copy the array of data.
  
  Attributes
  ----------
  None
  
  Methods
  -------
  None
  
  See Also
  --------
  :func:`pandas.array`
      The recommended function for creating a StringArray.
  Series.str
      The string methods are available on Series backed by
      a StringArray.
  
  Notes
  -----
  StringArray returns a BooleanArray for comparison methods.
  
  Examples
  --------
  >>> pd.array(['This is', 'some text', None, 'data.'], dtype="string")
  <StringArray>
  ['This is', 'some text', <NA>, 'data.']
  Length: 4, dtype: string
  
  Unlike arrays instantiated with ``dtype="object"``, ``StringArray``
  will convert the values to strings.
  
  >>> pd.array(['1', 1], dtype="object")
  <NumpyExtensionArray>
  ['1', 1]
  Length: 2, dtype: object
  >>> pd.array(['1', 1], dtype="string")
  <StringArray>
  ['1', '1']
  Length: 2, dtype: string
  
  However, instantiating StringArrays directly with non-strings will raise an error.
  
  For comparison methods, `StringArray` returns a :class:`pandas.BooleanArray`:
  
  >>> pd.array(["a", None, "c"], dtype="string") == "a"
  <BooleanArray>
  [True, <NA>, False]
  Length: 3, dtype: boolean
class_docstr_tok: ["Extension","array","for","string","data",".","..","warning",":",":","StringArray","is","considered","experimental",".","The","implementation","and","parts","of","the","API","may","change","without","warning",".","Parameters","--","--","--","--","--","values",":","array-like","The","array","of","data",".","..","warning",":",":","Currently",",","this","expects","an","object-dtype","ndarray","where","the","elements","are","Python","strings","or","nan-likes","(","``","None","``",",","``","np.nan","``",",","``","NA","``",")",".","This","may","change","without","warning","in","the","future",".","Use",":","meth",":","`","pandas.array","`","with","``","dtype=","''","string","''","``","for","a","stable","way","of","creating","a","`","StringArray","`","from","any","sequence",".","..","versionchanged",":",":","1.5.0","StringArray","now","accepts","array-likes","containing","nan-likes","(","``","None","``",",","``","np.nan","``",")","for","the","``","values","``","parameter","in","addition","to","strings","and",":","attr",":","`","pandas.NA","`","copy",":","bool",",","default","False","Whether","to","copy","the","array","of","data",".","Attributes","--","--","--","--","--","None","Methods","--","--","--","-","None","See","Also","--","--","--","--",":","func",":","`","pandas.array","`","The","recommended","function","for","creating","a","StringArray",".","Series.str","The","string","methods","are","available","on","Series","backed","by","a","StringArray",".","Notes","--","--","-","StringArray","returns","a","BooleanArray","for","comparison","methods",".","Examples","--","--","--","--",">",">",">","pd.array","(","[","'This","is","'",",","'some","text","'",",","None",",","'data",".","'","]",",","dtype=","''","string","''",")","<","StringArray",">","[","'This","is","'",",","'some","text","'",",","<","NA",">",",","'data",".","'","]","Length",":","4",",","dtype",":","string","Unlike","arrays","instantiated","with","``","dtype=","''","object","''","``",",","``","StringArray","``","will","convert","the","values","to","strings",".",">",">",">","pd.array","(","[","'","1","'",",","1","]",",","dtype=","''","object","''",")","<","NumpyExtensionArray",">","[","'","1","'",",","1","]","Length",":","2",",","dtype",":","object",">",">",">","pd.array","(","[","'","1","'",",","1","]",",","dtype=","''","string","''",")","<","StringArray",">","[","'","1","'",",","'","1","'","]","Length",":","2",",","dtype",":","string","However",",","instantiating","StringArrays","directly","with","non-strings","will","raise","an","error",".","For","comparison","methods",",","`","StringArray","`","returns","a",":","class",":","`","pandas.BooleanArray","`",":",">",">",">","pd.array","(","[","``","a","''",",","None",",","``","c","''","]",",","dtype=","''","string","''",")","==","``","a","''","<","BooleanArray",">","[","True",",","<","NA",">",",","False","]","Length",":","3",",","dtype",":","boolean"]
code: def searchsorted(
      self,
      value: NumpyValueArrayLike | ExtensionArray,
      side: Literal["left", "right"] = "left",
      sorter: NumpySorter | None = None,
  ) -> npt.NDArray[np.intp] | np.intp:
      if self._hasna:
          raise ValueError(
              "searchsorted requires array to be sorted, which is impossible "
              "with NAs present."
          )
      return super().searchsorted(value=value, side=side, sorter=sorter)
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, ClassVar, Literal, cast
  import numpy
  from pandas._config import get_option
  from pandas._libs import lib, missing
  from pandas._libs.arrays import NDArrayBacked
  from pandas._libs.lib import ensure_string_array
  from pandas.compat import pa_version_under10p1
  from pandas.compat.numpy import function
  from pandas.util._decorators import doc
  from pandas.core.dtypes.base import ExtensionDtype, StorageExtensionDtype, register_extension_dtype
  from pandas.core.dtypes.common import is_array_like, is_bool_dtype, is_integer_dtype, is_object_dtype, is_string_dtype, pandas_dtype
  from pandas.core import ops
  from pandas.core.array_algos import masked_reductions
  from pandas.core.arrays.base import ExtensionArray
  from pandas.core.arrays.floating import FloatingArray, FloatingDtype
  from pandas.core.arrays.integer import IntegerArray, IntegerDtype
  from pandas.core.arrays.numpy_ import NumpyExtensionArray
  from pandas.core.construction import extract_array
  from pandas.core.indexers import check_array_indexer
  from pandas.core.missing import isna
label_desc: Use image node_id 16 for calling the StringArray obj's underlying member method code with example usage: obj.searchsorted(value, side, sorter) and returns: super