The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Best Way to Strip Traling Letter?
03-20-2017, 05:52 PM
Post: #1
Best Way to Strip Traling Letter?
In a program I'm writing, I want to strip the trailing "S" from a word. Since I'm a BASIC programmer, I came up with the following code. It works but I'd like to know if there's a better way to do it on the Prime - a more "Prime-fluent" way, if you will.

Code:
T:=U;
IF RIGHT(T,1)=="S" THEN
  T:=LEFT(T,DIM(T)-1);
END;

Thanks for any advice!

Tom L

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Best Way to Strip Traling Letter? - toml_12953 - 03-20-2017 05:52 PM



User(s) browsing this thread: 2 Guest(s)