Alpha Video Training
Results 1 to 3 of 3

Thread: ? Replace (xBasic command)

  1. #1
    Member
    Real Name
    Marty Francom
    Join Date
    Jan 2011
    Posts
    43

    Default ? Replace (xBasic command)

    I have a string and I want to replace certain characters in that
    string. I cann't get the syntax correct in xBasic. Here's how I would do it in PowerBasic:

    lets say:
    cPath = "This is my string"
    and I want to replace the spaces with _
    in PB I would do:
    Replace " " with "_" in cPath

    How do I do this in xBasic ?

  2. #2
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

  3. #3
    Member
    Real Name
    Marty Francom
    Join Date
    Jan 2011
    Posts
    43

    Default Re: ? Replace (xBasic command)

    Peter, Thanks again. This is what I found that works:

    cPath = strtran(cPath, " ", "_")

Similar Threads

  1. Is there an Xbasic command to undelete record
    By pk9 in forum Alpha Five Version 7
    Replies: 32
    Last Post: 03-24-2009, 08:25 PM
  2. Find/Replace not working with inline Xbasic?
    By smrogers in forum Alpha Five Version 7
    Replies: 1
    Last Post: 10-26-2006, 01:53 PM
  3. is there a built command/function to replace this user Function?
    By Graham Wickens in forum Alpha Five Version 6
    Replies: 4
    Last Post: 12-07-2005, 11:54 AM
  4. xbasic command
    By Lonnie in forum Alpha Five Version 5
    Replies: 2
    Last Post: 10-20-2004, 01:20 PM
  5. On the Xbasic copy command
    By Selig Starr in forum Alpha Five Version 4
    Replies: 2
    Last Post: 04-25-2000, 12:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •