Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

str_start(3) [debian man page]

str_start(3)						     Library Functions Manual						      str_start(3)

NAME
str_start - compare prefixes of strings SYNTAX
#include <str.h> size_t str_start(const char* a,const char* b); DESCRIPTION
str_start returns 1 if b is a prefix of a, 0 otherwise. SEE ALSO
strncmp(3) str_start(3)

Check Out this Related Man Page

STRCMP(3)						   BSD Library Functions Manual 						 STRCMP(3)

NAME
strcmp, strncmp -- compare strings LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <string.h> int strcmp(const char *s1, const char *s2); int strncmp(const char *s1, const char *s2, size_t len); DESCRIPTION
The strcmp() and strncmp() functions lexicographically compare the nul-terminated strings s1 and s2. RETURN VALUES
The strcmp() and strncmp() return an integer greater than, equal to, or less than 0, according to whether the string s1 is greater than, equal to, or less than the string s2. The comparison is done using unsigned characters, so that '200' is greater than ''. The strncmp() compares not more than len characters. SEE ALSO
bcmp(3), memcmp(3), strcasecmp(3), strcoll(3), strxfrm(3) STANDARDS
The strcmp() and strncmp() functions conform to ANSI X3.159-1989 (``ANSI C89''). NOTES
If len is zero strncmp() returns always 0. BSD
June 4, 1993 BSD
Man Page

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies

2. Shell Programming and Scripting

shell script for extracting out the shortest substring from the given starting and en

hi all, i need an urgent help for writing a shell script which will extract out and print a substring which is the shortest substring from the given string where first and last character of that substring will be given by the user. for e.g. if str="abcdpqracdpqaserd" now if the user gives 'a'... (18 Replies)
Discussion started by: pankajd
18 Replies

3. Shell Programming and Scripting

Getting Email from script

I am running a script from crontab and sending the output to another file. This is the statement in crontab: 45 23 * * * /dst/nikutst/clarity/lib/DSTRestartTest1.sh >> /dst/nikutst/clarity/logs/RestartTest.log The script runs fine and sends output to the log file. But I always get a system... (3 Replies)
Discussion started by: snturner
3 Replies

4. Shell Programming and Scripting

simple jsp problem.

I have my jsp page located at /install/apache-tomcat-5.5.29/webapps/jsp-examples/light/login.jsp There fore i will have to use following url to access it. localhost:8080/jsp-examples/light/login.jsp How would i make this little shorter like. localhost:8080/login.jsp I m using... (13 Replies)
Discussion started by: pinga123
13 Replies

5. Programming

passing object to function, columns class

I am working on a small columns class, since I use allot of tabular data. I am trying to set up code to allow me to efficiently read in tabular data, manipulate it, and write to output files. I more or less know what I need to do, but there are many options to sort through. I have the beginnings... (14 Replies)
Discussion started by: LMHmedchem
14 Replies

6. Programming

trouble with delimiter

Hi all, I have a flat file storing data like this, Testing, What I'm trying to do is to retrieve the data "1", "2" and "3". So far I manage retrieve the data by using the code below, while (getline(file, line)) { if (line.find("Testing")!=string::npos) ... (5 Replies)
Discussion started by: vinzping
5 Replies

7. Shell Programming and Scripting

Extracting a part of a string

Hi, I needed to extract some specific characters from a string based on user input. For example: After the script executes the user enters the following details: Please enter the string: This is a shell script Please enter the starting position: 11 Please enter the number of characters to be... (4 Replies)
Discussion started by: ChandanN
4 Replies

8. UNIX for Dummies Questions & Answers

Cut only time from string

Hi Guys, I have following different lines separated by multiple spaces. And i need to cut only the time part (16:53) from the string. How can we achieve it? remedy 29210 1 1 07:55 ? 00:06:20 /opt/bmc/java/jre1.6.0_17/bin/java -Xms1024m -Xmx2048m -XX:MaxPermSize=1024m... (12 Replies)
Discussion started by: Khushbu
12 Replies