Results 1 to 5 of 5
Thread: Convert dash to underscorde
- 04-04-2011, 03:30 PM #1
Member
- Join Date
- Jan 2010
- Posts
- 80
- Rep Power
- 0
Convert dash to underscorde
Hi
I have transferred Cobol program to Java program. After the tranfromation I got Java file its variables have - "dash". The problem is that Java considers this as subtraction.
I know there is a method that takes the java file and converts each - to _
Could you please tell me what the method is ?
Thank you
- 04-04-2011, 03:43 PM #2
Member
- Join Date
- Mar 2011
- Posts
- 26
- Rep Power
- 0
Don't know if i understood that right, but you can try String.replace() or even better
linux sed...
- 04-04-2011, 06:31 PM #3
Member
- Join Date
- Apr 2011
- Location
- Athens, Greece
- Posts
- 52
- Rep Power
- 0
If I get it right you want to change the chars inside the .java file? Use a text editor and do edit --> replace and make it search for "-" and convert it to "_" but be sure to do it one by one and not replace all because it could brake your code if there is a dash somewhere that is needed...
- 04-04-2011, 07:05 PM #4
Member
- Join Date
- Jan 2010
- Posts
- 80
- Rep Power
- 0
- 04-04-2011, 07:06 PM #5
Member
- Join Date
- Jan 2010
- Posts
- 80
- Rep Power
- 0
Similar Threads
-
draw smooth dash-ed line
By sarveshwar in forum Java 2DReplies: 3Last Post: 03-01-2011, 07:23 AM -
cannot convert from int to int[][]
By besweeet in forum New To JavaReplies: 9Last Post: 04-18-2010, 03:36 AM -
Convert to Int
By 6kyAngel in forum Java TipReplies: 0Last Post: 03-06-2009, 09:18 AM -
how to convert xml to xsd
By adi in forum XMLReplies: 2Last Post: 02-12-2009, 02:43 PM -
need the help to convert to and from UTF-8 and UCS-2
By sachin_n in forum Advanced JavaReplies: 1Last Post: 01-05-2009, 09:35 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks