रेंडरिंगhi

पाठ

Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.

Primitive string/text type.

Aliases: string

Syntax: textus

Category#

type

Examples#

radix/corpus/intrinseca/textus-transformationes.fab (canonical · keyword)#

Primitive string/text type.

# =============================================================================
# textus — Primitive string/text type
# =============================================================================
#
# What this teaches:
#   • Primitive string/text type.
#   • Related keywords: string, scriptum, ↦
#
# Common mistakes:
#   • Using `textus` transform methods on non-text types — `.slice()`, `.uppercase()`, `.lowercase()`, `.trim()`, `.split()`, `.replace()` are textus-only compiler intrinsics.
#
# See also: string, scriptum, ↦
# =============================================================================

# textus slice and transform intrinsics
#
# Compiler-owned textus methodi — sectio, maiuscula, minuscula, recide,
# divide, muta.
#
# GRAMMAR:
#   s.slice(lo, hi) | s.uppercase() | s.lowercase() | s.trim()
#   s.split(sep) | s.replace(old, new)
#
# divide returns lista<textus>; pairs with lista/ exempla for collection smoke.
# Derived locals use sit to avoid repeating fixum _ across the transform chain.
# Wasm tier Runnable.
#
# EXPECTED OUTPUT:
#   Smoke asserts exit 0 only.

main {
    let nuntius  " Ave Roma "

    let secta  nuntius.slice(1, 4)
    let magna  nuntius.uppercase()
    let parva  nuntius.lowercase()
    let rasa  nuntius.trim()
    let partes  rasa.split(" ")
    let mutata  rasa.replace("Roma", "Munde")

    print secta, magna, parva
    print rasa, partes, mutata
}