Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 22, 2013, 10:34 AM   #1
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
ASCII String Dump?

I'd like a utility that acts kind of like

Code:
hexdump -c
But instead of mixing in the ASCII with everything else, I'd like it to only print the ASCII.

It could have a bit of intelligence, only considering something to be ASCII if it's part of a sequence that contains at least two alphanumeric ASCII characters.

Then I would like it to insert line breaks between each sequence when it outputs it.

I'd like this utility so that I can easily find all the ASCII strings any file contains (specially, I'd like to see what strings a .mpg contains and what a .dll contains - I'm trying to find a way of determining what codecs the .dll file recognizes, and I'm hoping that it involves some ASCII strings.)
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   0 Reply With Quote
Old Aug 22, 2013, 10:56 AM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Code:
man strings
chown33 is offline   2 Reply With Quote
Old Aug 22, 2013, 03:31 PM   #3
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by chown33 View Post
Code:
man strings
Thanks. I had worked out an algorithm and started writing it in C but stopped when I saw your post. Interestingly, it looks like the algorithm they used produced the exact same results as mine (or at least my algorithm wouldn't have removed anything there's didn't.)

I was assigning point values to characters. Symbols got 1 and alphanumeric got 2... everything else got 0. Contiguous sections of symbols and alphanumeric that added up to at least 4 would get printed, and a line break would be entered when it swapped from printing to not printing.

But it looks like I need not implement it because someone else already did. Thanks!
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Format string is not a string literal. larswik Mac Programming 5 Jan 17, 2014 10:45 PM
Search a string for a String of a specific format. ncaissie iPhone/iPad Programming 19 Nov 15, 2013 10:42 AM
String chars to ASCII decimals inside terminal hakonandersson Mac Programming 14 Jun 16, 2013 11:11 AM

Forum Jump

All times are GMT -5. The time now is 11:19 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC