HPlogo System Debug Reference Manual > Chapter 10 System Debug Standard Functions

func strdel

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

String delete. Returns a string with a substring deleted from the source string.

Syntax



   strdel (source position length)

Formal Declaration



   strdel:str (source:str position:u16 length:u16)

Parameters


source

The string from which to delete the substring.

position

The index of the starting character to delete. String indices are 1-based. (That is, indices are 1, 2, 3, ... rather than 0, 1, 2, ....)

length

The number of characters to delete. If this value is larger than the actual number of characters in the string, the string is deleted from the starting position to the end without an error indication.

Examples



   $nmdebug > = strdel("This is NOT fun", 9, 4)
   "This is fun"

Starting at position 9, delete the next four characters.

   $nmdebug > wl strdel("Fishy, fishy, in the brook.", 13, 1000)
   Fishy, fishy

Delete characters from position 13 to the end of the string.

Limitations, Restrictions


none




func strapp


func strdown