HPlogo System Debug Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 System Debug Standard Functions

func strdel

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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

Feedback to webmaster