Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

str_chr(3) [debian man page]

str_chr(3)						     Library Functions Manual							str_chr(3)

NAME
str_chr - find character in ASCIIZ string SYNTAX
#include <str.h> size_t str_chr(const char* haystack,char needle); DESCRIPTION
str_chr returns the index of the first occurrance of needle or in string. SEE ALSO
strchr(3) str_chr(3)

Check Out this Related Man Page

MB_STRRICHR(3)								 1							    MB_STRRICHR(3)

mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive

SYNOPSIS
string mb_strrichr (string $haystack, string $needle, [bool $part = false], [string $encoding = mb_internal_encoding()]) DESCRIPTION
mb_strrichr(3) finds the last occurrence of $needle in $haystack and returns the portion of $haystack. Unlike mb_strrchr(3), mb_strrichr(3) is case-insensitive. If $needle is not found, it returns FALSE. PARAMETERS
o $haystack - The string from which to get the last occurrence of $needle o $needle - The string to find in $haystack o $part - Determines which portion of $haystack this function returns. If set to TRUE, it returns all of $haystack from the beginning to the last occurrence of $needle. If set to FALSE, it returns all of $haystack from the last occurrence of $needle to the end, o $encoding - Character encoding name to use. If it is omitted, internal character encoding is used. RETURN VALUES
Returns the portion of $haystack. or FALSE if $needle is not found. SEE ALSO
mb_stristr(3), mb_strrchr(3). PHP Documentation Group MB_STRRICHR(3)
Man Page

11 More Discussions You Might Find Interesting

1. Programming

char constants vs. hard-coding

This might be a silly question, but I thought I'd ask anyway. If I'm writing in C, isn't it more efficient to, for instance, use constant character variable set to 'A' instead of hard-coding a character 'A'? Since it's only a single character instead of a string, it might not matter much. (10 Replies)
Discussion started by: cleopard
10 Replies

2. Solaris

Not able to lock the port

Hi, I am working with Sun-Solaris 9 and in our application I need to connect the UPS with Serial port,after that I need to monitor it..but before stating communication,It should lock that port,To check it,first i am trying to make sure the lock directory exists and I am able to find it(/var/lock)... (0 Replies)
Discussion started by: smartgupta
0 Replies

3. Programming

Socket Programming Send File

Hello my friends; Look at this 2 program: Client: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> int main ( int agrc, char *argv ) { int Socket; struct sockaddr_in... (5 Replies)
Discussion started by: htabesh
5 Replies

4. Shell Programming and Scripting

Matching 2 items in a string

Little lost here, I am trying to search a line for both values after the $ signs. My ultimate goal is to get percertage. <?php $string = "Something on sale for $4 and orginal price $10"; $strstr =. strstr($string, '$'); $strrchr =. strrchr($string, '$'); echo "$strstr<br>"; echo... (1 Reply)
Discussion started by: mrlayance
1 Replies

5. Programming

Redirecting Terminal to Local Application!

i wanted to execute some terminal commands on local linux, parse their output and display it to the user, i checked netcat source code but i couldnt understance it since im new to c (and linux at the same time). so i was wondering if there is away to run an instance of terminal hidden, read and... (15 Replies)
Discussion started by: JonhyM
15 Replies

6. Programming

C code : Segmentation fault

Hi Friends, I have written a small code in C which performs the below operations Task : 1 ) read line by line from a file. 2 ) assuming 3th and 4th fields of the file as GN and GNTO 3 ) The target file should contain all the fields except GNTO. 4... (3 Replies)
Discussion started by: kiran_bhatter
3 Replies

7. UNIX for Dummies Questions & Answers

Simple Problems to Solve!

Hi, I'm pretty poor at using UNIX but I'm learning. Please help me with these simple problems! Much appreciated! 1. I've changed my shell from bash to csh but I prefer bash. How do I change back? I've tried using chsh -s but it's not working! 2. I'm trying to download TopCat. I've done... (2 Replies)
Discussion started by: SimonWhite
2 Replies

8. Programming

Using boost in program created by g++

I am trying to use the split provided by boost. I have a string and want to split on "/". string value = "trig/4"; Have no idea how to compile and link it. I have extracted boost in /chrisd/tomso-12.04/source/library/boost_1_52_0 In my program /raytrac.cc I have put ... (5 Replies)
Discussion started by: kristinu
5 Replies

9. UNIX for Advanced & Expert Users

Memory fragmentation in a Linux settop box

Being a moderator at openATV, a forum for Linux settup boxes, I have seen reports, and sometimes am experiencing myself, artefacts during video playback or timeshift. As the artefacts are non repetetive (rewinding and watching again does not show artefacts), I can exclude a corrupted video source.... (23 Replies)
Discussion started by: Fischreiher
23 Replies

10. Shell Programming and Scripting

Leaving directory Error

Hi, i have a question, when I install any software it give error message like as follow : sudo make password for csm: make all-recursive make: Entering directory `/home/csm/Desktop/miRanda-3.3a' Making all in man make: Entering directory `/home/csm/Desktop/miRanda-3.3a/man' make:... (18 Replies)
Discussion started by: harpreetmanku04
18 Replies

11. UNIX for Beginners Questions & Answers

NTP synchronised problem in our Centos 7.6 node

Someone, please help on this issue:- Note : for security reason i didn't mention hostnames and ips. ============================================================================== # ntpstat unsynchronised polling server every 1024 s Ntpstat showing unsynchronised. ... (29 Replies)
Discussion started by: shanmugaraj
29 Replies