Jump to content

ecos

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ecos's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. phpORcaffine, Thanks for the help.  This is simialr to what I had come up with, but I needed something that could scale with any size string and any multiple of 128. Initially I had a series of similar statements with each multiple, but that was extra clunky. Thanks again, Ecos 
  2. Barand, you are a true Guru!! The celi() fucntion looks quite handy.  Thanks for the help! Ecos
  3. Hello, I need help padding a string to a certain length, based on its existing length.  I need the string to have a length which is a multiple of 128.  If the string is 100 characters long, I need to pad with 28 characters to equal 128.  If the string is 208 characters, I need to pad it with 48 characters to equal 256, and so on for 384, 512, 640, ... I know a bit about str_pad(), but I am not sure of a good way to know which multiple of 128 to bump the string length up to. Thanks for any and all help! Ecos
  4. HEY Hey!  That did it Barand.  Thanks! Explode and Wordwrap were the tickets, but I just didn't see how to use them. Thank you both! Ecos
  5. businessman332211, Thanks for the quick reply, but with my limited experience, this code is not quite doing it.  Explode returns an array [array explode ( string separator, string string [, int limit] )] and wordrap() accepts only strings.  implode and substr don't jump out as winners either.  Sorry if I misunderstand your insructions. Thanks, Ecos 
  6. Hello all, I am trying to format a string such as there are, 2 characters seperated by a space for 16 two character sets and then a new line. Example: 54 68 65 20 75 6e 6b 6e 6f 77 6e 20 6d 65 73 73 61 67 65 20 69 73 3a 20 54 68 65 20 44 45 53 2d 74 65 73 74 20 63 6f 6e 74 65 73 74 27 73 20 70 6c 61 69 6e 74 65 78 74 08 08 08 08 08 08 08 08 I have tried grouping everyother character, add a space between them and use chunk_split to make the correct length with a \r\n at the end, but the extra spaces I added are not trimmed.  Any help would be GREATLY appreciated. THanks, Ecos
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.