The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 str.Delete string remainder

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AKazak Posted - 07/20/2021 : 05:15:28 AM
OriginPro 2021b (64-bit) SR2 9.8.5.212
Windows 10 21H1 x64

https://www.originlab.com/doc/LabTalk/ref/String-obj#Delete tells
quote:
If count is longer than the string, the remainder of the string will be removed.


What does this mean?
Can I use this to delete the characters from the end of the string?
Please share an example.

Thank you.

---
Andrey
2   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 07/21/2021 : 1:40:21 PM
quote:
Originally posted by YimingChen

If count is larger than the string length, the characters from index until the end of the string get deleted.

string str$ = "this is a test";
i=str.Delete(5, 16); 
str$=;  // this


James



Dear James,

Thank you for clarifying this.
Please add the clarification and good example to the existing documentation.

---
Andrey
YimingChen Posted - 07/21/2021 : 12:03:10 PM
If count is larger than the string length, the characters from index until the end of the string get deleted.

string str$ = "this is a test";
i=str.Delete(5, 16); 
str$=;  // this


James

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000