473,406 Members | 2,954 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,406 software developers and data experts.

Removing Apart Of String

32
Hi a simple questin in got is whythe remove thing doesent always work
if your starting integer is 0 and ending integer is like 10 its fine
Expand|Select|Wrap|Line Numbers
  1.  
  2. string =  textbox1.text.remove(0,10)
  3.  
  4.  
but if your starting integer is like 47 and last is 57 it wont work. WHY. Could somebody please help me withit
May 6 '08 #1
3 1098
debasisdas
8,127 Expert 4TB
just check all the over loaded Remove methods with their parameters , you will come to know the simple answer.
May 6 '08 #2
lotus18
866 512MB
Hi a simple questin in got is whythe remove thing doesent always work
if your starting integer is 0 and ending integer is like 10 its fine
Expand|Select|Wrap|Line Numbers
  1.  
  2. string =  textbox1.text.remove(0,10)
  3.  
  4.  
but if your starting integer is like 47 and last is 57 it wont work. WHY. Could somebody please help me withit
Hi

Expand|Select|Wrap|Line Numbers
  1.  string =  textbox1.text.remove(0,10)
  2.  
This means that 0 is your starting index to remove the characters and 10 is the length or the number of characters to be deleted.

Rey Sean
May 7 '08 #3
kuzen
20
you probably got it already from the replies above, whatever, your code will look like this
Expand|Select|Wrap|Line Numbers
  1. string=textbox1.text.remove(47,10)
  2.  
I presume you wanted to remove char.s with indices 47-57
the problem you're facing is caused by either the length of your textbox1.text is not 104(47+57) or even if it is, you're removing char.s with indices 47-104
May 8 '08 #4

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

Similar topics

115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
1
by: ChrisC | last post by:
Im having trouble removing line breaks from my c# string. Actually, im having trouble getting .Trim() to work properly, as it seems to count a string that has nowt but a break of some sort as not...
11
by: EAI | last post by:
Hi All, I have a XML of the following form <?xml version="1.0"?> <xxxx xmlns="http://xxx.xxx.com"> .... </xxxx> When I try to read xml using SelectSingleNode, I am getting exception
6
by: Niyazi | last post by:
Hi all, What is fastest way removing duplicated value from string array using vb.net? Here is what currently I am doing but the the array contains over 16000 items. And it just do it in 10 or...
7
by: noridotjabi | last post by:
I'm working on a prompt style thing and I need a way to pass arguments to commands within my program. For example: ::hello -v -r -n If this is entered as one input string, can I (in any...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
4
by: JJ | last post by:
Is there a way of checking that a line with escape sequences in it, has no strings in it (apart from the escape sequences)? i.e. a line with \n\t\t\t\t\t\t\t\r\n would have no string in it a...
7
by: =?Utf-8?B?Sm9lbCBNZXJr?= | last post by:
I have created a custom class with both value type members and reference type members. I then have another custom class which inherits from a generic list of my first class. This custom listneeds...
2
by: Semajthewise | last post by:
Ok guys, This is a quick overview of what I'm trying to do. 2 textboxes. textbox1 has a fraction entered by the user into it in one of these 2 ways 1(space)3/4 or simply 3/4 Now what this code is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.