XmTextFindString(3X)XmTextFindString(3X)NAME
XmTextFindString - A Text function that finds the beginning position of a text string
SYNOPSIS
#include <Xm/Xm.h>
Boolean XmTextFindString (widget, start, string, direction, position)
Widget widget;
XmTextPosition start;
char *string;
XmTextDirection direction;
XmTextPosition *position;
DESCRIPTION
XmTextFindString locates the beginning position of a specified text string. This routine searches forward or backward for the first occur-
rence of the string starting from the given start position. If it finds a match, the function returns the position of the first character
of the string in position. Specifies the Text widget ID. Specifies the character position from which the search proceeds. This is an
integer number of characters from the beginning of the text buffer. The first character position is 0. Specifies the search string.
Indicates the search direction. It is relative to the primary direction of the text. The possible values are: The search proceeds toward
the end of the text buffer. The search proceeds toward the beginning of the text buffer. Specifies the pointer in which the first charac-
ter position of the string match is returned. This is an integer number of characters from the beginning of the buffer. The first charac-
ter position is 0. If the function returns False, this value is undefined.
For a complete definition of Text and its associated resources, see XmText(3X).
RETURN VALUE
Returns True if a string match is found; otherwise, returns False.
SEE ALSO XmText(3X), XmTextFindStringWcs(3X)XmTextFindString(3X)
Check Out this Related Man Page
XmTextFindString(library call) XmTextFindString(library call)
NAME
XmTextFindString -- A Text function that finds the beginning position of a text string
SYNOPSIS
#include <Xm/Xm.h>
Boolean XmTextFindString(
Widget widget,
XmTextPosition start,
char *string,
XmTextDirection direction,
XmTextPosition *position);
DESCRIPTION
XmTextFindString locates the beginning position of a specified text string. This routine searches forward or backward for the first occur-
rence of the string starting from the given start position. If it finds a match, the function returns the position of the first character
of the string in position. If the match string begins at the current position, this routine returns the current position.
widget Specifies the Text widget ID.
start Specifies the character position from which the search proceeds. This is an integer number of characters from the beginning of
the text buffer. The first character position is 0 (zero).
string Specifies the search string.
direction Indicates the search direction. It is relative to the primary direction of the text. The possible values are
XmTEXT_FORWARD
The search proceeds toward the end of the text buffer.
XmTEXT_BACKWARD
The search proceeds toward the beginning of the text buffer.
position Specifies the pointer in which the first character position of the string match is returned. This is an integer number of charac-
ters from the beginning of the buffer. The first character position is 0 (zero). If the function returns False, this value is
undefined.
For a complete definition of Text and its associated resources, see XmText(3).
RETURN
Returns True if a string match is found; otherwise, returns False.
RELATED XmText(3) and XmTextFindStringWcs(3).
XmTextFindString(library call)
Hi,
If, in a text file a string is expected at a certain fixed position(for eg at position 5 or from 5-10 on every line)
how to check whether data is present on that position or not?
Thnx in advance (6 Replies)
Hi,
I have a line where i need to get certain part of it.. example..
text txt tt: 1909
thats how exactly it looks and all spaces are to be counted.. i need to retrieve 1909..
Thanks (11 Replies)
Compete noob question....
I need a script to search through a directory and find files containing text string abcde1234 for example and then copy that file with that text string to another directory
help please :eek: (9 Replies)
Depending upon character at particular position in a line, string needs to be appended followed by empty spaces till 256th column position at the end of the each line in the file.
example:
123p4 J8769
123q4 R2345
123r4 S2345
What I Require is, it has to check at 7th column character and... (10 Replies)
ok so what I am trying to do is search through 200k files that have ext .000 or .702. for *@yahoo.com.tw and if it finds that in the file. then remove the file. this is my code... what am i doing wrong. it seams it will only find asdflkajsdf@yahoo.com.tw as a string and not *@yahoo.com.tw so it... (5 Replies)
Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Hi,
I am trying to search a string from a text file which is in between "" (Double Quotes) (Eg: "Unix"), and replace it with a | where ever it is appearing in the text file and save the file.
Please help me.
-kkmdv (6 Replies)
search in text for string
I assigned text to variable
for example :
cafe tea coca > drinks
and i want to check is $i is in "drink" or not
thanks (6 Replies)
The file has record length 200. And i have 100 search strings which are ten digits of character from 1 to 10 characters all of them are unique, they need to searched in a file. Please help me to pull the records based on position (say from 1-10).
test data
1FAHP2DW0BG115206RASHEED ... (6 Replies)
I woud like to substitue a string on a specific position for specific lines
I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"
For every line (except 1,2, 3 and the last one) , I need to check between the 9th and the 16th digits.
For the 3rd line, I... (7 Replies)
Can any one help me out with following problem...
I want to search in a file which has two strings repeat each time(like start and end) i want to search between these two string in C programming.
please help me with the solution.
thanks in advance. (8 Replies)
Hi All,
I have a file that I would like to search for data and replace other data by record position number:
Example search..
search for "CLARK KENT" and replace Amt data "000025" with "000155"???
I'm able to search and replace unique data but, came to a stump when wanting to replace data... (11 Replies)
Hi I need a bash script that can search through a text file for all lines starting with 71502FSC1206 on every line it finds starting with this I need to place a letter F at the 127 position on that line.
Thanks
Paul (6 Replies)
Hi I have a text file that I want to change some of the characters based on their position. My file contain multiple lines and characters should be counted continuously line by line. For example, I want to convert the 150th T to C. What can I do? Here is a portion of my file:... (10 Replies)
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)