Manual:DIL Manual/left()

From DikuMUD Wiki
Jump to navigation Jump to search

Function:  string left ( o : string, l : integer );
  o
         the original string to be parsed
  l
         The amount of characters to parse out
  return
         the left portion of the string with length l
This function parses the string passed to it and returns the number
of characters defined in its second argument.
Example:  "short" := left ("shorten me",5);
Example:

---~---~---~---~---~---~---~---~---
dilbegin aware describe (arg:string);
var
        side:string;
        oneword:stringlist;
        location:string;
        ln:integer;
        args:stringlist;
        temp:string;
        i:integer;
        x:extraptr;
code

dilend

---~---~---~---~---~---~---~---~---

---~---~---~---~---~---~---~---~---

Function:  string left ( o : string, l : integer );
  o
         the original string to be parsed
  l
         The amount of characters to parse out
  return
         the left portion of the string with length l
This function parses the string passed to it and returns the number
of characters defined in its second argument.
Example:  "short" := left ("shorten me",5);
Example:

---~---~---~---~---~---~---~---~---
dilbegin aware describe (arg:string);
var
        side:string;
        oneword:stringlist;
        location:string;
        ln:integer;
        args:stringlist;
        temp:string;
        i:integer;
        x:extraptr;
code

dilend

---~---~---~---~---~---~---~---~---

---~---~---~---~---~---~---~---~---