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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 str.Delete string remainder
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 07/20/2021 :  05:15:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Edited by - AKazak on 07/20/2021 05:15:46 AM

YimingChen

1666 Posts

Posted - 07/21/2021 :  12:03:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - YimingChen on 07/21/2021 12:03:27 PM
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/21/2021 :  1:40:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000