Replace.htm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>Replace$ (string$, find$, replace$)</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. string$ = any valid string variable <br />
  13. find$ = any valid string <br />
  14. replace$ = any valid string
  15. </td>
  16. </tr>
  17. </table>
  18. <h1>Description</h1>
  19. <table>
  20. <tr>
  21. <td>
  22. This command will allow you to replace characters within a string with another. Use this to strip or convert letters out of your strings (like removing spaces or turning them into underscores). Pretty straight forward.
  23. </td>
  24. </tr>
  25. </table>
  26. <h1><a href=../2d_examples/Replace.bb>Example</a></h1>
  27. <table>
  28. <tr>
  29. <td>
  30. name$="Bill Wallace" <br />
  31. Print "Your name before replacing: " + name$ <br />
  32. Print "Your name with L changed to B: " + Replace$(name$,"l","b") <br />
  33. </td>
  34. </tr>
  35. </table>
  36. <br>
  37. <a target=_top href=../index.htm>Index</a><br>
  38. <br>
  39. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Replace&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  40. </html>