473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

What is the Opposite of JSP substring()

I need to get the first 20 characters from the session.getId() and when I use substring(20) it removes the trailing 20 characters. But all I want is the first 20.

What would I use to get that?

Thanks
Oct 16 '07 #1
3 5968
iam_clint
1,208 Expert 1GB
substing(1, 20)............................................... ...........................dang short posts
Oct 16 '07 #2
substing(1, 20)............................................... ...........................dang short posts
Thanks for saving me troubleshooting time.

I decided on substring(1,21) so a total of 20 characters are returned. When 1,20 is used only 19 are returned.

Big Thanks.
Oct 16 '07 #3
acoder
16,027 Expert Mod 8TB
The start index is 0-based, so you would use substring(0,20) - see link.
Oct 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Larry Woods | last post by:
I want a regular expression that will return TRUE if there is NOT a substring in the string. Example: Return true if the substring "image" is NOT in the string. TIA, Larry Woods
62
by: Jupiter | last post by:
Hey, I would like to know 2 things. 1)Is there any function (in C standard library) that extracts a substring from a string? 2)Is there any function (in C standard library) that returns the...
18
by: Jm | last post by:
Hi all I feel stupid for asking this, but i just went to use the left() function from vb6 only to find it doesnt do what it used to under .NET. Im assuming theres something else now im meant to...
11
by: Darren Anderson | last post by:
I have a function that I've tried using in an if then statement and I've found that no matter how much reworking I do with the code, the expected result is incorrect. the code: If Not...
9
by: pranav.choudhary | last post by:
Hi I am new to python. I wanted to know if there is an opposite of "import"
4
by: Jean-François Michaud | last post by:
Hello, I've been looking at this for a bit now and I don't see what's wrong with the code. Can anybody see a problem with this? Here is an XSLT snippet I use. <xsl:template match="graphic">...
6
by: kellygreer1 | last post by:
What is a good one line method for doing a "length safe" String.Substring? The VB classes offer up the old Left function so that string s = Microsoft.VisualBasic.Left("kelly",200) // s will =...
11
by: igor.tatarinov | last post by:
Given a bunch of arrays, if I want to create tuples, there is zip(arrays). What if I want to do the opposite: break a tuple up and append the values to given arrays: map(append, arrays, tupl)...
3
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
Two part question: 1. Is Regex more efficient than manually comparing values using Substring? 2. I've never created a Regex expression. How would I use regex to do the equivalent of what I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.