Author Topic: Question about string handling.  (Read 3671 times)

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: Question about string handling.
« Reply #15 on: 2010-Oct-01 »
I think the right$ thing might evaluate a tad faster, though.

How about the speed of MID$ command?

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10760
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Question about string handling.
« Reply #16 on: 2010-Oct-01 »
left$, right$, mid$ are basically the same command. The replace might be a tad slower when the string lengths of needle$ and haystack$ are not equal.

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: Question about string handling.
« Reply #17 on: 2010-Oct-03 »
The problem with most of your function is/was that numbers converted to strings used to have a space in front (the hidden + (positive) sign) so you used to do:

A$=right$(str$(n),Len(str$(n))-1) just to remove this blank, on the c64 and others.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

MrTAToad

  • Guest
Re: Question about string handling.
« Reply #18 on: 2010-Oct-03 »
Well, the C64 didn't do automatic type conversion in BASIC :)