<div class="meta" robots="noindex">

</div>

Method

# ChrB

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `String.ChrByte<string.chrbyte>` as a replacement.

</div>

## Description

Returns a single byte `string</api/data_types/string>` whose value is passed.

## Usage

*result* = **ChrB**(*value*)

| Part   | Type                               | Description                                    |
|--------|------------------------------------|------------------------------------------------|
| result | `String</api/data_types/string>`   | The single byte string whose value was passed. |
| value  | `Integer</api/data_types/integer>` | The value of the character you want.           |

## Notes

The <span class="title-ref">ChrB</span> function returns a single byte string whose value is specified. <span class="title-ref">ChrB</span> should be used rather than `Chr</api/text/chr>` when value represents binary data.

## Sample code

These examples use the <span class="title-ref">ChrB</span> function to return the characters whose values are specified.

``` xojo
Dim s As String
s = ChrB(32) ' returns a space with a nil TextEncoding
s = ChrB(13) ' returns carriage return with a nil TextEncoding
```

## Compatibility

All project types on all supported operating systems.

## See also

`String.AscByte<string.ascbyte>`, `Chr</api/text/chr>`, `Encoding</api/text/encoding_text/encoding>`, `String.IndexOfBytes<string.indexofbytes>`, `String.LeftBytes<string.leftbytes>`, `String.Bytes<string.bytes>`, `String.MiddleBytes<string.middlebytes>`, `String.RightBytes<string.rightbytes>` functions; `EndOfLine</api/text/endofline>`, `TextEncoding</api/text/encoding_text/textencoding>` classes; `Encodings</api/text/encoding_text/encodings>` module
