DwtSTextReplace(3Dwt)DwtSTextReplace(3Dwt)Name
DwtSTextReplace - Replaces a portion of the current text string in the simple text widget or inserts a new substring in the text.
Syntax
void DwtSTextReplace(widget, from_pos, to_pos, value)
Widget widget;
int from_pos, to_pos;
DwtCompString value;
Arguments
widget Specifies the ID of the simple text widget whose text string you want to replace.
from_pos Specifies the beginning character position within the text string marking the text being replaced.
to_pos Specifies the last character position within the text string marking the text being replaced.
value Specifies the text to replace part of the current text in the simple text widget.
Description
The DwtSTextReplace function replaces part of the text string in the simple text widget. Within the window, the positions are numbered
starting from 0 and increasing sequentially. For example, to replace the second and third characters in the string, from_pos should be 1
and to_pos should be 3. To insert a string after the fourth character, from_pos and to_pos should both be 4.
See AlsoDwtSText(3Dwt), DwtSTextGetString(3Dwt), DwtSTextGetEditable(3Dwt), DwtSTextSetEditable(3Dwt), DwtSTextGetMaxLength(3Dwt), DwtS-
TextSetMaxLength(3Dwt), DwtSTextSetSelection(3Dwt), DwtSTextClearSelection(3Dwt), DwtSTextGetSelection(3Dwt)
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding
DwtSTextReplace(3Dwt)
Hi,
I need a script to read the n° character from a text file.
eg: if the text file contains the line "123456" ,I nedd a command to display the number 4, as an example.
I tried with awk and printf but it seems only works with words separated with spaces, but in this case I have only one word... (15 Replies)
Hello
I need to search for a mult-line text in a file exfile1 and replace that text with another text. The text to search for is in exfile2 and the replacement text is in exfile3.
I work with kornshell under AIX and need to do this with a lot of files. (the file type is postscript and they need... (10 Replies)
Hi everyone,
I am attempting to do something that should be very simple. How do I replace a specific line of a file with different text, and then save that file to its original name? I believe I want to use the sed command with the c option, but I after trying many times, I can't get the right... (10 Replies)
Hi All,
I would like to know how, iff at all we can, we may use the 'tr' command to replace a single character with multiple characters.
eg: if i have a string valued "him", how can i use 'tr' to replace 'i' with "oo" to make "hoom".
Just replacing a single character by many.
tried:-... (16 Replies)
I just want to add a particular string in text file using shell script
text file format
1 columns-10
2 text=89
3 no<>
4
5 test-9876
6 size=9
string need to insert in 4th line
<switch IP='158.195.2.567' port='5900' user='testc' password='asdfrp' Code='8'>
After inserting the... (8 Replies)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
I have a text file like:
The name of the project = "Symbion centrifuge"
The name of the subsytem = "motor demon"
now i would like to read the string after the = into a variable to write it to another file.
later use like:
sed s/'PROJECTNAME'/"$projectname"/ <header.tex >temp
... (9 Replies)
What would be the most succinct way of doing this (preferably in 1 line, maybe 2):
searching the first 10 characters of every line in a text file for a specific string, and if it was found, print out characters 11-20 of the line on which the string was found.
In this case, it's known that there... (13 Replies)
I have a text (text.txt) and I would like to replace only the first 2 occurrences of a word (but I might need to replace more):
For example, if text is this:
CAR sweet head
hat red yellow
CAR book brown
tiger CAR cow CAR
CAR milk
I would like to replace the word "CAR" with word... (12 Replies)
I have a string
-----
i want to replace the 3rd '-' with a character
How can i do that
Basically im trying to do hangman
I have added the '-----' string to a file called hash
and i have the character in a variable called $input
also i have the character location(index) in this variable... (12 Replies)
Hi Guru's,
I need some help with data manipulation using shell scripting. I know how to replace the whole string but not part of the string.
The value after aa= should be replaced with the value in the mail leaving ,OU=111,OU=222,DC=333 as is. Below are the inputs and expected outputs.
Input:... (17 Replies)
I have text file as follows and would like to remove the last occurance of "UNION ALL" string and replace @@ with single quote (').
Input text in file is
with temp as (
( select ----------- where OPERATION = @@B@@ and OBJECTTYPE = @@P@@ and start_time desc ) UNION ALL
( select... (9 Replies)
I have a text file where I need to find the string = ST*850*
This string is repetaed several times in the file, so I need to know how many times it appears in the file, this is the text files:
ISA*00* *00* *08*925485USNR *ZZ*IMSALADDERSP... (13 Replies)
I need to replace dashes (i.e. -) if present from positions 351-357 with zero (i.e. 0), I also need to replace dash (i.e “-“) if present between position 024-043 with zero (i.e. 0) & I replace " " (i.e. 2 space characters) if present at position 381-382 with "04". Total length of record is 413.... (11 Replies)
Hi Gurus,
I need to replace part of string in file, the string format is below: I can use ABCD to find string, then replace values after "=" sign
ABCD_XXX=value
ABCD_YYY=value
after replace
ABCD_XXX=new_value
ABCD_YYY=new_value
my OS is SunOS 5.10 Generic_150400-64 sun4v sparc sun4v
... (9 Replies)