Home > lang > mid 
 en fr de es it nl pl pt pt_BR sq ca hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
Mid$
sResult = Mid$ ( sSource AS String , iStart AS Integer [ , iLength AS Integer ] ) AS String
sResult = Mid ( sSource AS String , iStart AS Integer [ , iLength AS Integer ] ) AS String

Returns a String, which is that part of the source String sSource, which starts as position iStart and has the length iLength.

If iLength is not specified, everything from the position iStart to the end is returned.

If iLength is negative, everything from the position Start except the (- iLength ) last characters is returned.

Mid$ is optimized so that no string duplication occurs to generate the result.

Example

PRINT Mid$("Gambas", 3, 2)

mb

PRINT Mid$("Gambas", 4)

bas

PRINT Mid$("Gambas", 2, -1)

amba

See also

Функции за стрингови