# TextDirectionHeuristicCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/text/TextDirectionHeuristicCompat.java+class:androidx.core.text.TextDirectionHeuristicCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public interface TextDirectionHeuristicCompat
```

<br />

*** ** * ** ***

Interface for objects that use a heuristic for guessing at the paragraph direction by examining text.

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `https://developer.android.com/reference/androidx/core/text/TextDirectionHeuristicCompat#isRtl(char[],int,int)(char[] array, int start, int count)` Guess if a chars array is in the RTL direction or not. |
| `abstract boolean` | `https://developer.android.com/reference/androidx/core/text/TextDirectionHeuristicCompat#isRtl(java.lang.CharSequence,int,int)(https://developer.android.com/reference/java/lang/CharSequence.html cs, int start, int count)` Guess if a `CharSequence` is in the RTL direction or not. |

## Public methods

### isRtl

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
abstract boolean isRtl(char[] array, int start, int count)
```

Guess if a chars array is in the RTL direction or not.

| Parameters |
|---|---|
| `char[] array` | the char array. |
| `int start` | start index, inclusive. |
| `int count` | the length to check, must not be negative and not greater than `array.length - start`. |

| Returns |
|---|---|
| `boolean` | true if all chars in the range are to be considered in a RTL direction, false otherwise. |

### isRtl

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
abstract boolean isRtl(CharSequence cs, int start, int count)
```

Guess if a `CharSequence` is in the RTL direction or not.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence.html cs` | the CharSequence. |
| `int start` | start index, inclusive. |
| `int count` | the length to check, must not be negative and not greater than `CharSequence.length() - start`. |

| Returns |
|---|---|
| `boolean` | true if all chars in the range are to be considered in a RTL direction, false otherwise. |