Clif,

The string left & right functions need 2 parameters. the first is the string
you want to manipulate and the second is how many characters you want to
have from that string.
StringLeft (string,quantity of characters)

The first parameter must be a string. either an actual string enclosed by
quotes or a variable name that is holding the string without quotes. The
second parameter must be an integer that says how many characters you want.
if the length of the string is shorter than the number you ask for, the
entire string will be given. For example:

StringLeft ("confusing",4)
This will return conf

StringLeft ("confusing",10)
This will return confusing

StringLeft (MyString,5)
This version is using a variable named MyString that has been declared
elsewhere in your script and has been filled with a text string elsewhere in
your script. For example, you could use something like the following in
notepad:

Include "hjglobal.jsh" ; default HJ global variables
Include "hjconst.jsh" ; default HJ constants


Script TestString ()
;can be attached to a hot key by going to documentation in the view menu
var     string MyString ;a variable to hole the string

Let MyString = GetWord ()  ; makes the variable = to the word located at the
active cursor

say("My String =",ot_string) ; says message my string =
say(MyString,ot_string) ; says the contents of the variable

say ("My String left =",ot_string) ;says message my string left
say (StringLeft (MyString, 4),ot_string) ;says first 4 characters of
variable

EndScript

Daine

> -----Original Message-----
> From: "Clif Gazaway" <[EMAIL PROTECTED]>
> Date: Thu, 26 Aug 1999 14:56:35 -0700
> Subject: StringLeft Script Function
>
> What is the syntax for StringLeft function in JFW 3.3 Script?

-
Visit the jfw ml web page: http://jfw.cjb.net

Reply via email to