string

How can I display a string which excess 254 chars in Crystal Reports 8.5?

hi How can I display a string which excess 254 chars in my report created by crystal reports 8.5? My application that shows the report ia a vb6.0 application. Thank you ...

How to format a string displayed in a MessageBox in C#?

I want to display a string in a message box with a following format: Machine : TestMachine User : UserName I am doing this: string strMsg = "Machine :" + "TestMahine" + "\r\n" + "User :" + "UserName"; MessageBox.Show(strMsg); When I do this the message box do not display a string as formated above. Colon...

How to replace value in string array

How to remove my value in String Array and how i can rearrange public string[] selNames = new string[5]; selNames[0]="AA"; selNames[1]="BB"; selNames[2]="CC"; selNames[3]="DD"; selNames[4]="EE"; In certain Conditaion i need to Check for the existing value and i want to remove it from my collection, How i can do it. i tried like below...

How to print bold string in C++?

Hi, I got an old application which was written in a C++. I have 0 experience with it but I am suppose to make some changes in app. One of them is to change some text. Problem is that part of updated text needs to be bold, but i have no idea how to do that. I googled but with no much success. Only think I now is to go to new line with \n...

Tuncate string in ASP.NET using VB.NET

Hi, I made a function to truncate a string in the code behind file. But how do i use it in the aspx file? This is the textbox: <asp:TemplateField HeaderText="page" HeaderStyle-Wrap="true"> <ItemTemplate> <a href='<%# makepageURL( Eval("page") )%> '> <%# Eval("page")%> </a> </ItemTemplate> <EditI...

how to split a string by position in Java

Hello, I did not find anywhere an answer.. If i have: String s = "How are you"? How can i split this into two strings, so first string containing from 0..s.length()/2 and the 2nd string from s.length()/2+1..s.length()? Thanks! ...

Parsing a string to determine it's a website URL? (asp.net)

In ASP.net what's the best way I can parse a string to determine if it's a valid URL? ...

How can I read a string with spaces in it in C?

scanf("%s",str) won't do it. It will stop reading at the first space. gets(str) doesn't work either when the string is large. Any ideas? ...

Displaying ± symbol in Java

How to get the character ± in a string? ...

android parcelable string array

I have ArrayList<String> ids = ArrayList<String>(); What would be the cleanest way to make it Parceleable? Apparently String itself is not parcelable, so Parcel.writeList(ids) is not working. I was thinking to either parcelize ArrayList<Uri> or put array contents into a Bundle. ...

Deleting empty spaces in a string

Okay I have a simple Javascript problem, and I hope some of you are eager to help me. I realize it's not very difficult but I've been working whole day and just can't get my head around it. Here it goes: I have a sentence in a Textfield form and I need to reprint the content of a sentence but WITHOUT spaces. For example: "My name is Sl...

How to write number of characters of a string in a textfield?

Okay, I have this textfield form that contains some text. What I need to do is to count number of characters of that particular string and print it into another textfield form, basically like this: function numberOfCharacters() { var number = document.forms[0].textfield1.length; document.forms[0].textfield2.value = number; } ...

Using string taken from Scanner not working?

When I run the program and enter a rank & gender it yells at me and tells me it is an invalid gender. I cannot see why if I enter "male" into the console, it does not equal the string "male"? Can please explain to me why this doesn't work and perhaps some suggestions on how to fix it? Thanks! import java.io.File; import java.io.IOEx...

Extract digits from a string in Java

I have a Java String object. I need to extract only digits from it. I'll give an example: "123-456-789" I want "123456789" Is there a library function that extracts only digits? Thanks for the answers. Before I try these I need to know if I have to install any additional llibraries? ...

How to split a string in Ruby?

I have special strings like name1="value1" name2='value2'. Values can contain whitespaces and are delimited by either single quotes or double quotes. Names never contain whitespaces. name/value pairs are separated by whitespaces. I want to parse them into a list of name-value pairs like this string.magic_split() => { "name1"=>"value1",...

Feeding multi-line string value to jquery methods

How do I feed string variable holding multiline value in it to jquery method like prepend? I need it to construct a form pass by drupal search module like - $('#divsearch').prepend('<?php print $search_box; ?>'). Thanks a bunch. ...

What formatter pattern should I use to get '00123', '00001' strings from numbers '123' and '1' correspondingly?

I need to format numbers in a way that they should be preceded with zeros to contain 5 digits. I don't get how to create patterns for java formatter. I tried %4d but it doesn't adds zeros. ...

Converting a 2d array of ints to char and string in Java

How can i convert the ints in a 2d array into chars, and strings? (seperately) If i copy ints to a char array i just get the ascii code. For example public int a[5][5] //some code public String b[5][5] = public int a[5][5] Thanks ...

Cocoa Programming Help! NSString and NSTextfield stuff!

Hi experts, thanks for going through my question. But I have something like this... I have an application that has a NSTextfield named userName, a NSTextfield named helloName, and a NSButton that starts the whole process. All it does is that the user types in his/her name in the Name textfield. when the user presses confirm, the Hello...

How can I check whether a string is a (very big) number?

I need to make a number validation for specified string. The problem is, the string could be a large number, larger than any numeric type in C# can represent, so I can't use TryParse functions, because they will give only information about whether they can convert to those types. It should take into account -/+, separator, and current c...