Questions tagged [string-length]

String length most commonly refers to the number of characters contained within a string. However, it could also mean the screen space a string takes up when printed.

This tag should be used for either of the two following types of questions:

  1. Those dealing with the number of characters contained within a string.
  2. Those dealing with measuring the size of a string (in pixels, millimeters, etc.) when it is printed on a screen.
1040 questions
-5
votes
2 answers

String.length woes

Edit: Solutions must compile against Microsoft Visual Studio 2012. I want to use a known string length to declare another string of the same length. The reasoning is the second string will act as a container for operation done to the first string…
Georgina Davenport
  • 189
  • 1
  • 2
  • 11
-5
votes
1 answer

String compare and length

Hi I am trying to right a program but am having so much difficulty. The program is a challenge I made up myself. I want to read in 6 strings from the user. Then I want to create a function that will allow me to compare those strings to find which…
-5
votes
1 answer

Jquery: how to get length of background-image style attribute?

I need to get the length of an inline style background-image source, eg:
Length would be 9 I have tried: $('#imageholder').css('background-image').length; But I cant seem to get it…
MeltingDog
  • 14,310
  • 43
  • 165
  • 295
-6
votes
5 answers

JAVA string how can i implement the length method

My roommate's teacher gave them a assignment to implement string length method in JAVA? we have thought out two ways. Check the element,and when get the out of bounds exception,it means the end of string,we catch this exception,then we can get the…
Wythe
  • 149
  • 3
  • 12
-9
votes
2 answers

im trying to get the index of a character using only the charAt and length methods for strings

im trying to get the index of a character using only the charAt and length methods for strings. this is what the question asks :Declare a public method called indexOf that takes a character parameter and returns the index in the stored string of the…
1 2 3
69
70