4D v14.3Change string |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
Change string
|
Change string ( source ; newChars ; where ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
source | String |
![]() |
Original string | |||||
newChars | String |
![]() |
New characters | |||||
where | Longint |
![]() |
Where to start the changes | |||||
Function result | String |
![]() |
Resulting string | |||||
Change string changes a group of characters in source and returns the resulting string. The command overlays source, with the characters in newChars, at the character described by where.
If newChars is an empty string (""), Change string returns source unchanged. Change string always returns a string of the same length as source. If where is less than one or greater than the length of source, Change string returns source.
Change string is different from Insert string in that it overwrites characters instead of inserting them.
The following example illustrates the use of Change string. The results are assigned to the variable vtResult.
vtResult:=Change string("Acme";"CME";2) ` vtResult gets "ACME"
vtResult:=Change string("November";"Dec";1) ` vtResult gets "December"
Product: 4D
Theme: String
Number:
234
Created: < 4D v6
Delete string
Insert string
Replace string
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)