String handling · Manejo de cadenas
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · Esta página necesita un navegador reciente (con soporte para SharedArrayBuffer). Por favor, actualiza Chrome, Edge, Firefox o Safari a la última versión.
English
LENGTH, MID and RIGHT
- The 2026 guide's string routines are
LENGTH,MID,RIGHT,UCASEandLCASE. - Positions start at 1.
MID(text, start, length)copieslengthcharacters fromstart.RIGHT(text, n)copies the lastncharacters.
Español
LONGITUD, MEDIO y DERECHA
- Las rutinas de cadenas de la guía 2026 son
LENGTH,MID,RIGHT,UCASEyLCASE. - Las posiciones comienzan en 1.
MID(text, start, length)copialengthcaracteres a partir destart.RIGHT(text, n)copia los últimosncaracteres.
OUTPUT LENGTH("Happy Days")
OUTPUT MID("ABCDEFGH", 2, 3)
OUTPUT RIGHT("ABCDEFGH", 3)
English
UCASE and LCASE take one character
- The guide's
UCASEandLCASEtake a single character, not a whole string. UCASE('h')is'H'. A character that is not a letter comes back unchanged.- When a paper needs a whole string in capitals, the insert gives you
TO_UPPER.
Español
MAYUSC y MINUSC toman un carácter
- Las rutinas
UCASEyLCASEde la guía toman un único carácter, no una cadena completa. UCASE('h')es'H'. Un carácter que no es una letra se devuelve sin cambios.- Cuando un examen requiere toda una cadena en mayúsculas, el inserto te proporciona
TO_UPPER.
OUTPUT UCASE('h')
OUTPUT LCASE('W')
OUTPUT TO_UPPER("Error 803")
English
& joins strings
&concatenates two strings."Summer" & " " & "Pudding"is"Summer Pudding".- IGCSE 0478 has no
&. There you list values afterOUTPUTwith commas. - Commas still work in this guide when you only want them printed side by side.
Español
& une cadenas
&concatena dos cadenas."Summer" & " " & "Pudding"da como resultado"Summer Pudding".- IGCSE 0478 no tiene
&. En ese caso, se listan los valores después deOUTPUTseparados por comas. - Las comas siguen funcionando en esta guía cuando solo se desea que se impriman lado a lado.
OUTPUT "Summer" & " " & "Pudding"
English
Common mistakes
MIDcounts from 1. The second argument is the start, the third is how many characters.- Do not pass a whole string to
UCASE. That routine is for one character.
Español
Errores comunes
MIDcuenta desde 1. El segundo argumento es el inicio, el tercero es cuántos caracteres copiar.- No pase una cadena completa a
UCASE. Esa rutina es para un único carácter.
English
Now you try
- Use
MID,RIGHTand&.
Español
Ahora practica
- Utilice
MID,RIGHTy&.
Output · Salida MID("ABCDEFGH", 2, 3) and · y RIGHT("ABCDEFGH", 3), each on its own line. · Emitir MID("ABCDEFGH", 2, 3) y RIGHT("ABCDEFGH", 3), cada uno en su propia línea.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.
Output · Salida Summer Pudding by joining Summer, a space and Pudding with &. · Emitir Summer Pudding uniendo Summer, un espacio y Pudding con &.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.
Output the upper-case form of the character h, then ERROR 803 using TO_UPPER. · Emitir la forma en mayúsculas del carácter h, luego ERROR 803 usando TO_UPPER.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.