Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wsprintf(3c) [opensolaris man page]

wsprintf(3C)						   Standard C Library Functions 					      wsprintf(3C)

NAME
wsprintf - formatted output conversion SYNOPSIS
#include <stdio.h> #include <widec.h> int wsprintf(wchar_t *s, const char *format, /* arg */ ... );); DESCRIPTION
The wsprintf() function outputs a Process Code string ending with a Process Code (wchar_t) null character. It is the user's responsibility to allocate enough space for this wchar_t string. This returns the number of Process Code characters (excluding the null terminator) that have been written. The conversion specifications and behavior of wsprintf() are the same as the regular sprintf(3C) function except that the result is a Process Code string for wsprintf(), and on Extended Unix Code (EUC) character string for sprintf(). RETURN VALUES
Upon successful completion, wsprintf() returns the number of characters printed. Otherwise, a negative value is returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------------------------------------+ |ATTRIBUTE TYPE ATTRIBUTE VALUE | |MT-Level MT-Safe | +-----------------------------------------------------------+ SEE ALSO
wsscanf(3C), printf(3C), scanf(3C), sprintf(3C), attributes(5) SunOS 5.11 29 Dec 1996 wsprintf(3C)

Check Out this Related Man Page

wsprintf(3C)						   Standard C Library Functions 					      wsprintf(3C)

NAME
wsprintf - formatted output conversion SYNOPSIS
#include <stdio.h> #include <widec.h> int wsprintf(wchar_t *s, const char *format, /* arg */ ... );); DESCRIPTION
The wsprintf() function outputs a Process Code string ending with a Process Code (wchar_t) null character. It is the user's responsibility to allocate enough space for this wchar_t string. This returns the number of Process Code characters (excluding the null terminator) that have been written. The conversion specifications and behavior of wsprintf() are the same as the regular sprintf(3C) function except that the result is a Process Code string for wsprintf(), and on Extended Unix Code (EUC) character string for sprintf(). RETURN VALUES
Upon successful completion, wsprintf() returns the number of characters printed. Otherwise, a negative value is returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
wsscanf(3C), printf(3C), scanf(3C), sprintf(3C), attributes(5) SunOS 5.10 29 Dec 1996 wsprintf(3C)
Man Page

13 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Home Directory Location Code

Hello All, I am a teacher at a local high school, and we have put together a small computer and loaded a linux distro onto it for the students to experiment with, because 20 children share the computer, it is hard to keep track of there home directorys, i was wondering if i could find a script... (10 Replies)
Discussion started by: hks_turbokits
10 Replies

2. Shell Programming and Scripting

date

file1 E108,0,2/3/1995,0,E001,E003,A,15000,1250,7.211538,12/14/2008 E109,0,2/15/1995,0,E001,E001,A,78000,6500,37.5,2/3/1995 resultant date should be in this formate E108,0,199523,0,E001,E003,A,15000,1250,7.21153820081214 E109,0,1995215,0,E001,E001,A,78000,6500,37.5,199523 Is the any... (10 Replies)
Discussion started by: charandevu
10 Replies

3. Programming

Better than scanf

I don't know how to do this: printf("creazione nuovo messaggio\n"); printf("insert dest\n"); scanf("%s",dest); printf("insert object\n"); scanf("%s",ogg); printf("inserire text\n"); scanf("%s",test); ... (7 Replies)
Discussion started by: italian_boy
7 Replies

4. Solaris

space between two lines

hi team i have file test which contain hi how are u hi how u doing hellooo gud morning excepted output is hi how are hi how u doing (10 Replies)
Discussion started by: natraj005
10 Replies

5. Programming

How to right pad with zeros using sprintf?

I need to right-pad with zeros a string by using (s)printf. I looked up the manual and tried with printf("%-19s", buffer); which right-pad the string with spaces. So I tried printf("%019s", buffer); which left-pad the string with zeros. So I tried both printf("%-019s", buffer);... (9 Replies)
Discussion started by: emitrax
9 Replies

6. Shell Programming and Scripting

PERL - rounding fractional number

It seems that perl sprintf uses the round-to-even method: foreach my $i ( 0.5, 1.5, 2.5, 3.5 ) { printf "$i -> %.0f\n", $i; } __END__ 0.5 -> 0 1.5 -> 2 2.5 -> 2 3.5 -> 4 4.5 -> 4 Where we probably wants to use round-half-up, i.e. output should be as below: 0.5 -> 1 1.5 -> 2... (8 Replies)
Discussion started by: ganapati
8 Replies

7. Shell Programming and Scripting

switch values

Hi all, I am a relative novice with awk and am stuck on something I can't help thinking ought to be really simple. I have a file "mydata.txt" as below x 20 x 20 x x 45 x 45 x x 100 x 100 x x 50 x 50 x I am trying to write a simple script that will output... (17 Replies)
Discussion started by: hernand
17 Replies

8. Shell Programming and Scripting

How to get front and back parameter of each characters?

I have list of words file. I trying to get a front and back parameter of each characters of words. hello .... .... Here is what I have done: awk '{ word=$1; len=length(word); tlen=2*len-1; for (i=1; i<len; i++) a="#"; for (j=1; j<=len; j++) a=substr(word,j,1); ... (15 Replies)
Discussion started by: paranrat
15 Replies

9. UNIX for Beginners Questions & Answers

awk command issue

Hi All, I am trying to perform certain task using awk command but the command is not returning expected output though it is running fine independently but not in for loop. req: 1. I am searching a pattern (say pattern1) in a dated file 2. trying to search the last occurrence of the another... (11 Replies)
Discussion started by: abhii
11 Replies

10. UNIX for Beginners Questions & Answers

Remove string between number and character

hello ! I have to remove string between a number and set of characters. For example, 35818 -stress - - -stress - - - - - - DB-3754 44412 caul kid notify DB-3747 54432 roberto -, notify DB-3725 55522 aws _ _int _ _classified 2_a _a 2_m _m 2_classified 2_search... (7 Replies)
Discussion started by: ManoharMa
7 Replies

11. Shell Programming and Scripting

String of exclusions failed.

We are in a conversion where a list of six digit numbers needs to be excluded from an existing report. As new ones are added we have an ever longer string of "grep -v" commands like: grep -v 020516 | grep -v 020522 | grep -v 030132 | \ grep -v 030330 | grep -v 030357 | grep -v 050111 | \ ... (7 Replies)
Discussion started by: wbport
7 Replies

12. Web Development

Turning jQuery Code into Vue.js

The following is some code I am working on the replace our navbar (someday) with a Vue component. Vue.component("unix-navbar", { template: `<div class="neo-table-border vuenavbar"><div class="flex-item" style="margin-bottom:10px;padding-top:13px;"><a class="vuenavbarhome"... (19 Replies)
Discussion started by: Neo
19 Replies

13. Shell Programming and Scripting

Outputting characters after a given string and reporting the characters in the row below --sed

I have this fastq file: @M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86 GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA +test-1 GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies