# uproot.AsStrings

Defined in [uproot.interpretation.strings](https://github.com/scikit-hep/uproot/blob/f1299d71fa4f435b1901386346c8a42adbd72642/src/uproot/interpretation/strings.py) on [line 29](https://github.com/scikit-hep/uproot/blob/f1299d71fa4f435b1901386346c8a42adbd72642/src/uproot/interpretation/strings.py#L29).

| **Inheritance order:**                                                                 |
|----------------------------------------------------------------------------------------|
| 1. [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md) |

### *class* uproot.interpretation.strings.AsStrings(header_bytes=0, length_bytes='1-5', typename=None, original=None)

* **Parameters:**
  * **header_bytes** (*int*) – Number of bytes to skip at the beginning of each
    entry.
  * **length_bytes** ( *"1-5"* *or*  *"4"*) – Method used to determine the length of
    a string: “1-5” means one byte if the length is less than 256,
    otherwise the true length is in the next four bytes; “4” means
    always four bytes.
  * **typename** (*None* *or* *str*) – If None, construct a plausible C++ typename.
    Otherwise, take the suggestion as given.
  * **original** (None, [uproot.Model](uproot.model.Model.html.md), or [uproot.containers.Container](uproot.containers.Container.html.md)) – If
    this interpretation is derived from
    [simplify](uproot.interpretation.objects.AsObjects.html.md#uproot-interpretation-objects-asobjects-simplify), this is a
    reminder of the original
    [model](uproot.interpretation.objects.AsObjects.html.md#uproot-interpretation-objects-asobjects-model).

An [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md) for an array of strings.

This cannot be nested within other
[uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md) objects; it can only represent
a `TBranch` that only contains strings (not strings within `std::vector`,
for instance).

Note that the [uproot.AsString](uproot.containers.AsString.html.md) class is for strings nested
within other objects.

([simplify](uproot.interpretation.objects.AsObjects.html.md#uproot-interpretation-objects-asobjects-simplify) converts an
[uproot.AsObjects](uproot.interpretation.objects.AsObjects.html.md) of
[uproot.AsString](uproot.containers.AsString.html.md) into a
[uproot.AsStrings](uproot.interpretation.strings.AsStrings.html.md).)

<a id="uproot-interpretation-strings-asstrings-header-bytes"></a>

## header_bytes

#### AsStrings.header_bytes

The number of bytes to skip at the beginning of each entry.

<a id="uproot-interpretation-strings-asstrings-length-bytes"></a>

## length_bytes

#### AsStrings.length_bytes

“1-5” means one byte
if the length is less than 256, otherwise the true length is in the
next four bytes; “4” means always four bytes.

* **Type:**
  Method used to determine the length of a string

<a id="uproot-interpretation-strings-asstrings-original"></a>

## original

#### AsStrings.original

If not None, this was the original
[model](uproot.interpretation.objects.AsObjects.html.md#uproot-interpretation-objects-asobjects-model) from an
[uproot.AsObjects](uproot.interpretation.objects.AsObjects.html.md) that was simplified
into this [uproot.AsJagged](uproot.interpretation.jagged.AsJagged.html.md).

<a id="uproot-interpretation-strings-asstrings-cache-key"></a>

## cache_key

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.cache_key

<a id="uproot-interpretation-strings-asstrings-typename"></a>

## typename

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.typename

<a id="uproot-interpretation-strings-asstrings-numpy-dtype"></a>

## numpy_dtype

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.numpy_dtype

<a id="uproot-interpretation-strings-asstrings-awkward-form"></a>

## awkward_form

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.awkward_form(file, context=None, index_format='i64', header=False, tobject_header=False, breadcrumbs=())

* **Parameters:**
  * **file** ([uproot.ReadOnlyFile](uproot.reading.ReadOnlyFile.html.md)) – File to use to generate
    [uproot.Model](uproot.model.Model.html.md) classes from its
    [streamers](uproot.reading.ReadOnlyFile.html.md#uproot-reading-readonlyfile-streamers) and `file_path`
    for error messages.
  * **context** (*dict*) – Context for the Form-generation; defaults are
    the remaining arguments below.
  * **index_format** (*str*) – Format to use for indexes of the
    `awkward.forms.Form`; may be `"i32"`, `"u32"`, or
    `"i64"`.
  * **header** (*bool*) – If True, include header fields of each C++ class.
  * **tobject_header** (*bool*) – If True, include header fields of each `TObject`
    base class.
  * **breadcrumbs** (*tuple* *of* *class objects*) – Used to check for recursion.
    Types that contain themselves cannot be Awkward Arrays because the
    depth of instances is unknown.

The `awkward.forms.Form` to use to put objects of type type in an
Awkward Array.

<a id="uproot-interpretation-strings-asstrings-basket-array"></a>

## basket_array

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.basket_array(data, byte_offsets, basket, branch, context, cursor_offset, library, options)

* **Parameters:**
  * **data** (array of `numpy.uint8`) – Raw but uncompressed data from the
    `TBasket`. If the `TBasket` has offsets and navigational
    metadata, it is not included in this array.
  * **byte_offsets** (array of `numpy.int32`) – Index where each entry of
    the `TBasket` starts and stops. The header is not included
    (i.e. the first offset is `0`), and the length of this array
    is one greater than the number of entries in the `TBasket`.
  * **basket** ([uproot.models.TBasket.Model_TBasket](uproot.models.TBasket.Model_TBasket.html.md)) – The `TBasket` object.
  * **context** (*dict*) – Auxiliary data used in deserialization.
  * **cursor_offset** (*int*) – Correction to the integer keys used in
    [refs](uproot.source.cursor.Cursor.html.md#uproot-source-cursor-cursor-refs) for objects
    deserialized by reference
    ([uproot.deserialization.read_object_any](uproot.deserialization.read_object_any.html.md)).
  * **library** ([uproot.interpretation.library.Library](uproot.interpretation.library.Library.html.md)) – The
    requested library for output.
  * **interp_options** (*dict*) – Flags and other options passed through the
    interpretation process.

Performs the first step of interpretation, from uncompressed `TBasket`
data to a temporary array.

<a id="uproot-interpretation-strings-asstrings-final-array"></a>

## final_array

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.final_array(basket_arrays, entry_start, entry_stop, entry_offsets, library, branch, options)

* **Parameters:**
  * **basket_arrays** (*dict* *of* *int → array*) – Mapping from `TBasket`
    number to the temporary array returned by
    [basket_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-basket-array).
  * **entry_start** (*int*) – First entry to include when trimming any
    excess entries from the first `TBasket`.
  * **entry_stop** (*int*) – FIrst entry to exclude (one greater than the last
    entry to include) when trimming any excess entries from the
    last `TBasket`.
  * **entry_offsets** (*list* *of* *int*) – The
    [entry_offsets](uproot.behaviors.TBranch.TBranch.html.md#uproot-behaviors-tbranch-tbranch-entry-offsets) for this
    `TBranch`.
  * **library** ([uproot.interpretation.library.Library](uproot.interpretation.library.Library.html.md)) – The
    requested library for output.
  * **branch** ([uproot.TBranch](uproot.behaviors.TBranch.TBranch.html.md)) – The `TBranch`
    that is being interpreted.
  * **interp_options** (*dict*) – Flags and other options passed through the
    interpretation process.

Performs the last steps of interpretation, from a collection of
temporary arrays, one for each `TBasket`, to a trimmed, finalized,
grouped array, produced by the `library`.

<a id="uproot-interpretation-strings-asstrings-hook-before-basket-array"></a>

## hook_before_basket_array

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.hook_before_basket_array(\*args, \*\*kwargs)

Called in [basket_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-basket-array),
before any interpretation.

This is the first hook called in
[basket_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-basket-array).

<a id="uproot-interpretation-strings-asstrings-hook-after-basket-array"></a>

## hook_after_basket_array

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.hook_after_basket_array(\*args, \*\*kwargs)

Called in [basket_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-basket-array),
after all interpretation.

This is the last hook called in
[basket_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-basket-array).

<a id="uproot-interpretation-strings-asstrings-hook-before-final-array"></a>

## hook_before_final_array

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.hook_before_final_array(\*args, \*\*kwargs)

Called in [final_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-final-array),
before any trimming, finalization, or grouping.

This is the first hook called in
[final_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-final-array).

<a id="uproot-interpretation-strings-asstrings-hook-before-library-finalize"></a>

## hook_before_library_finalize

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.hook_before_library_finalize(\*args, \*\*kwargs)

Called in [final_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-final-array),
after trimming but before calling the
[finalize](uproot.interpretation.library.Library.html.md#uproot-interpretation-library-library-finalize) routine.

<a id="uproot-interpretation-strings-asstrings-hook-after-final-array"></a>

## hook_after_final_array

Inherited from [uproot.interpretation.Interpretation](uproot.interpretation.Interpretation.html.md).

#### AsStrings.hook_after_final_array(\*args, \*\*kwargs)

Called in [final_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-final-array),
after all trimming, finalization, and grouping.

This is the last hook called in
[final_array](uproot.interpretation.Interpretation.html.md#uproot-interpretation-interpretation-final-array).
