# String and number helpers

> Internal routines used by string searches, validation and rounding.

---

LLMS index: [llms.txt](/llms.txt)

---

Internal routines used by string searches, validation and rounding.

## C {#c}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-ceil-for-mysql-pg-catalog-text-6cf42e3d" href="#mysql-ceil-for-mysql-pg-catalog-text-6cf42e3d">`mysql.ceil_for_mysql(text) → bigint`</a> | Round a number parsed from text up to an integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L97-L100) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L706-L736) |
| <a id="mysql-check-set-pg-catalog-text-pg-catalog-text-bf4d13cb" href="#mysql-check-set-pg-catalog-text-pg-catalog-text-bf4d13cb">`mysql.check_set(text, text) → boolean`</a> | Check a value against a SET definition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/42-func-str.sql#L1108-L1114) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L162-L266) |

## F {#f}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-floor-for-mysql-pg-catalog-text-cd8649fe" href="#mysql-floor-for-mysql-pg-catalog-text-cd8649fe">`mysql.floor_for_mysql(text) → bigint`</a> | Round a number parsed from text down to an integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L102-L105) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L739-L769) |

## I {#i}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-is-numeric-pg-catalog-text-1e25f994" href="#mysql-is-numeric-pg-catalog-text-1e25f994">`mysql.is_numeric(text) → boolean`</a> | Validate the numeric representation. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L590-L598) |
| <a id="mysql-is-valid-binary-pg-catalog-text-49731578" href="#mysql-is-valid-binary-pg-catalog-text-49731578">`mysql.is_valid_binary(text) → boolean`</a> | Validate the numeric representation. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L575-L578) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L1443-L1462) |
| <a id="mysql-is-valid-hex-pg-catalog-text-e943f746" href="#mysql-is-valid-hex-pg-catalog-text-e943f746">`mysql.is_valid_hex(text) → boolean`</a> | Validate the numeric representation. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L585-L588) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L1465-L1484) |

## T {#t}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-text-instr-pg-catalog-text-pg-catalog-text-ed5f06d7" href="#mysql-text-instr-pg-catalog-text-pg-catalog-text-ed5f06d7">`mysql.text_instr(text, text) → integer`</a> | Find a substring for LOCATE or INSTR. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/42-func-str.sql#L1000-L1006) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L269-L278) |
| <a id="mysql-text-locate2-pg-catalog-text-pg-catalog-text-d1a1f5dd" href="#mysql-text-locate2-pg-catalog-text-pg-catalog-text-d1a1f5dd">`mysql.text_locate2(text, text) → integer`</a> | Find a substring for LOCATE or INSTR. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/42-func-str.sql#L410-L416) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L314-L318) |
| <a id="mysql-text-locate3-pg-catalog-text-pg-catalog-text-bigint-f8a36c11" href="#mysql-text-locate3-pg-catalog-text-pg-catalog-text-bigint-f8a36c11">`mysql.text_locate3(text, text, bigint) → integer`</a> | Find a substring for LOCATE or INSTR. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/42-func-str.sql#L518-L523) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L321-L325) |

---

Backlinks:

- [Functions](/docs/mysql/reference/objects/functions/)
