Author Topic: Fixing a String  (Read 5232 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Fixing a String
« on: April 14, 2011, 03:36:32 pm »
Code: [Select]
var bCallsCode = ['EF0E41', 'EF5A40', 'EFDE40', 'EFF040', 'EFD240', 'EF2D46', 'EF0946', 'EF0646', 'EF7648', 'EFA543', 'EFA843', 'EF0241', 'EF524B', 'EF934C', 'EF784C', 'EF754C', 'EF4B40', 'EFD84F', 'EFE440', 'EFED40', 'EFDB40', 'EFE140', 'EFE740', 'EFD840', 'EFEA40', 'EFD540', 'EF6346', 'EFA84F', 'EF7450', 'EF7150', 'EF974E', 'EF884E', 'EF694C', 'EF944E', 'EFBB4E', 'EFA94E', 'EFC14E', 'EFF049', 'EFB350', 'EFF142', 'EFC44E', 'EFD447', 'EF3442', 'EF3742', 'EF2542', 'EFFC40', 'EF2842', 'EF5842', 'EFFF40', 'EF2B42', 'EF5542', 'EFDF42', 'EF3142', 'EF7042', 'EF504A', 'EF5C4D', 'EFED4C', 'EF9847', 'EF9B47', 'EFA04E', 'EFA34E', 'EFD348', 'EF6E47', 'EF6C49', 'EF354A', 'EF384A', 'EF4345', 'EF4045', 'EFD141', 'EF5E42', 'EF5B42', 'EF4945', 'EF4645', 'EF4C45', 'EFB84E', 'EF4A4A', 'EF8E4E', 'EFB54E', 'EF434B', 'EF464B', 'EF234A', 'EF564A', 'EFEF4A', 'EF0541', 'EFC040', 'EFCC40', 'EF0C40', 'EFC84D', 'EFF547', 'EF1141', 'EF0841', 'EF5C44', 'EF6B44', 'EF7744', 'EF8944', 'EF8344', 'EF7D44', 'EF8044', 'EF4A44', 'EF5944', 'EF6244', 'EF7444', 'EF8644', 'EF4444', 'EF5344', 'EF6544', 'EF4144', 'EF5644', 'EF7144', 'EF6844', 'EF4744', 'EF2944', 'EF3244', 'EFF343', 'EFD843', 'EF3B44', 'EF0844', 'EF0E44', 'EFDE43', 'EFE443', 'EFEA43', 'EFED43', 'EFF643', 'EF2344', 'EF2F44', 'EF3844', 'EF0244', 'EFF943', 'EFDB43', 'EFE143', 'EFE743', 'EFF043', 'EF2044', 'EF2C44', 'EF1144', 'EF1D44', 'EF1A44', 'EF1444', 'EFFF43', 'EFFC43', 'EF1744', 'EF5F44', 'EF6E44', 'EF7A44', 'EF4D44', 'EF5044', 'EF2A43', 'EF6A4E', 'EF1B43', 'EF0C43', 'EF3043', 'EF0D4B', 'EF3343', 'EF3943', 'EF6D4E', 'EF0F43', 'EF1543', 'EF2143', 'EF2743', 'EF914E', 'EF9D4E', 'EF8B4E', 'EF854E', 'EFA64E', 'EFBE4E', 'EF7B40', 'EFBE45', 'EFC445', 'EFAC4E', 'EFB24E', 'EFDD47', 'EFF247', 'EF6C43', 'EF6943', 'EF9F43', 'EFA243', 'EF6742', 'EF2F4A', 'EF5743', 'EF204A', 'EF5143', 'EFC64F', 'EFC94F', 'EF844C', 'EF454F', 'EFB545', 'EFA645', 'EF0745', 'EF9B4D', 'EF6550', 'EFF74B', 'EF0F40', 'EF1240', 'EF664C', 'EFC148', 'EF7D4D', 'EF8C4D', 'EF7540', 'EF324A', 'EF874C', 'EFFD42', 'EF7942', 'EFC442', 'EF5245', 'EF864D', 'EFAD44', 'EFCB44', 'EFBF44', 'EFD342', 'EFD042', 'EFCA42', 'EFC742', 'EFCD42', 'EFAA44', 'EFB344', 'EFB044', 'EF9844', 'EF9E44', 'EFA144', 'EFBC44', 'EFC844', 'EFD444', 'EFB944', 'EFA444', 'EF8C4A', 'EF8C44', 'EF9544', 'EFC544', 'EF9B44', 'EFC244', 'EFD144', 'EFA744', 'EFCE44', 'EFB644', 'EFB440', 'EFD543', 'EF2242', 'EF4F42', 'EF854B', 'EF624D', 'EF894D', 'EFF24A', 'EF474A', 'EF444A', 'EF4E4C', 'EF4B4C', 'EF9B50', 'EF484C', 'EFF442', 'EF7E46', 'EF3B4A', 'EF1750', 'EF8F50', 'EFAA50', 'EF9649', 'EF9049', 'EF9949', 'EF7B46', 'EF7240', 'EF9940', 'EF8440', 'EF9640', 'EF8140', 'EF6F40', 'EF9340', 'EF9445', 'EF6F4C', 'EF1840', 'EF7249', 'EF3646', 'EF1546', 'EFDD50', 'EF9145', 'EFD04B', 'EF6A48', 'EFD747', 'EFF940', 'EFA648', 'EF7642', 'EF604C', 'EF984D', 'EFE047', 'EF294A', 'EF2C4A', 'EFF742', 'EFA540', 'EF5D40', 'EFC748', 'EF5F4D', 'EF8D40', 'EF8A40', 'EF9040', 'EF6340', 'EF634C', 'EFE347', 'EFA342', 'EF2D49', 'EFD744', 'EF0040', 'EF2740', 'EF0550', 'EF0250', 'EFCA45', 'EF5140', 'EF7849', 'EF0940', 'EFAC48', 'EFAB40', 'EF8347', 'EF1D50', 'EF1A50', 'EFB14C', 'EFAE40', 'EF5740', 'EFE542', 'EF304C', 'EF334C', 'EF5440', 'EF6C40', 'EF5C41', 'EFDA47', 'EF6841', 'EF6541', 'EF5F41', 'EF7D41', 'EF0B41', 'EF7A41', 'EF8041', 'EF8341', 'EF2E45', 'EFE050', 'EFA34B', 'EF1F42', 'EF1942', 'EF1C42', 'EF0D42', 'EF1042', 'EF5242', 'EFBF41', 'EF9B41', 'EFA741', 'EFA141', 'EF9E41', 'EF2F41', 'EF2341', 'EF1741', 'EF5341', 'EF5041', 'EF1342', 'EF1642', 'EF0742', 'EFBC41', 'EFAD41', 'EFAA41', 'EF9841', 'EF9541', 'EF8F41', 'EFB04A', 'EF8C41', 'EF9241', 'EF5641', 'EF6E41', 'EF1A41', 'EF4A41', 'EF4D41', 'EFB941', 'EF8941', 'EFA441', 'EF3E41', 'EF2041', 'EF1441', 'EF4741', 'EFB641', 'EF8641', 'EF3841', 'EF1D41', 'EF7141', 'EF4441', 'EF7741', 'EF0A42', 'EFB341', 'EF3B41', 'EF2641', 'EF7441', 'EF2C41', 'EF2941', 'EF3541', 'EF3241', 'EF4141', 'EFB24B', 'EF2350', 'EF9B4A', 'EFA348', 'EFB548', 'EF6940', 'EFB248', 'EF394C', 'EF6F43', 'EF7E43', 'EF7B43', 'EF7843', 'EF9343', 'EF9043', 'EF8D43', 'EF8A43', 'EF8743', 'EF8443', 'EF8143', 'EF2E42', 'EFF340', 'EFCF43', 'EFC643', 'EFC943', 'EFC343', 'EFC043', 'EFBD43', 'EFBA43', 'EFB743', 'EFB443', 'EFB143', 'EFAE43', 'EFAB43', 'EF3c40', 'EF0445', 'EF0145', 'EF1045', 'EF0d45', 'EF0A45', 'EF6049', 'EF4546', 'EF1E46', 'EF7F4B', 'EF794B', 'EFDC42', 'EFD74A', 'EFD147', 'EFDD4A', 'EFE64A', 'EFE34A', 'EFE04A', 'EFDA4A', 'EFFA4E', 'EFFD4E', 'EF034F', 'EF264A', 'EF8E48', 'EF7147', 'EF364C', 'EF7048', 'EF7F42', 'EF9F40', 'EFA240', 'EFA840', 'EF7840', 'EFF640', 'EF7045', 'EF6D45', 'EF7B4C', 'EFE54E', 'EF144A', 'EFCC4F', 'EFBF50', 'EF4048', 'EFFC49', 'EF4948', 'EF4648', 'EF4348', 'EF004C', 'EF2050', 'EF8C47', 'EF8F47', 'EF9247', 'EF8647', 'EFD441', 'EFBD40', 'EFBA40', 'EFCF40', 'EFC640', 'EF9C40', 'EF124F', 'EF0F4F', 'EFB44C', 'EFE94A', 'EFBF4A', 'EFCE47', 'EFCB4A', 'EFD44A', 'EFC54A', 'EF7C4B', 'EFBC4A', 'EFCE4A', 'EFC24A', 'EFD14A', 'EFC84A', 'EFE344', 'EF3F4C', 'EFC340', 'EFC940', 'EFBB48', 'EFB740', 'EF7C42', 'EF7546', 'EF6640', 'EF7E40', 'EF8E42', 'EF5746', 'EF6040', 'EFD450', 'EF9547', 'EFAF48', 'EF7246', 'EFA948', 'EF5E45', 'EF6145', 'EF6445', 'EFFB47', 'EF0448', 'EFFE47', 'EF8842', 'EF9E47', 'EF0148', 'EF8B42', 'EFA147', 'EFB041', 'EFCE41', 'EFC541', 'EFC841', 'EFCB41', 'EF4F48', 'EF5B48', 'EF4C48', 'EF5248', 'EF5E48', 'EFA447', 'EF6148', 'EF5548', 'EF6748']
I have this string and this is how it looks on Notepad++:



However, I'd like it to be all in the same line, but with side-scrolling, I don't want them fixed to avoid side-scrolling, I really want side-scrolling, all in one line.

Any idea of how to achieve that? Thanks.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Fixing a String
« Reply #1 on: April 14, 2011, 06:22:26 pm »
Write a quick java program to remove all the line breaks.  Pretty easily achieved just reading a file in, checking for the characters (like \n) that should not be written out, and writing out the rest.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Fixing a String
« Reply #2 on: April 14, 2011, 06:26:47 pm »
I think he's trying to get it to not word-wrap (soft line breaks).

I think it's under View > Word Wrap or something like that. Uncheck it and it should work.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Fixing a String
« Reply #3 on: April 14, 2011, 06:29:39 pm »
I think he's trying to get it to not word-wrap (soft line breaks).

I think it's under View > Word Wrap or something like that. Uncheck it and it should work.
Oh, strange.  Because it's under Computer Programming, and I assumed since the code block only scrolled downward, that it had specific line-breaks.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Fixing a String
« Reply #4 on: April 14, 2011, 07:03:09 pm »
But see the line number column. 17 has a huge gap after it :)




Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Fixing a String
« Reply #5 on: April 14, 2011, 07:17:21 pm »
But see the line number column. 17 has a huge gap after it :)
Ah, I see that now.  Then why is this in Computer Programming?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Fixing a String
« Reply #6 on: April 14, 2011, 07:27:20 pm »
But see the line number column. 17 has a huge gap after it :)
Ah, I see that now.  Then why is this in Computer Programming?

Here?




Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Fixing a String
« Reply #7 on: April 14, 2011, 10:04:09 pm »
But see the line number column. 17 has a huge gap after it :)
Ah, I see that now.  Then why is this in Computer Programming?

Here?
Strange. I guess we don't have a computer help sub-forum.  Yeah, I guess this works.  Now to see if Scout fixed the issue and got it working.

Thanks Deep Thought.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Fixing a String
« Reply #8 on: April 15, 2011, 04:10:17 am »
I think he's trying to get it to not word-wrap (soft line breaks).

I think it's under View > Word Wrap or something like that. Uncheck it and it should work.

View>"Moldar" (portuguese)

It worked great :D

I put this in this forum because I thought it was some \ character, I tried .replace('\r','') but it didn't work.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Fixing a String
« Reply #9 on: April 17, 2011, 12:29:07 am »
I usually keep codewrapping on so there isn't a huge horizontal scrollbar, but I've noticed that having a long line wrapped to many lines slows some text editors way down (especially gedit).
« Last Edit: April 17, 2011, 12:29:15 am by Deep Thought »




Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Fixing a String
« Reply #10 on: April 17, 2011, 01:37:06 am »
I usually keep codewrapping on so there isn't a huge horizontal scrollbar, but I've noticed that having a long line wrapped to many lines slows some text editors way down (especially gedit).

I like to scroll down (in this particular case) cos my arrays are all w000t.