user49051: I'm new to Arduino and my first project is an RFID reader. since I need a lot of known tags list , i have a problem with not enough memory. for that reason I want to convert strings like :  "426d9244", "1265dd39"... to a long int. I know it's been asked but as a new programer I find it hard to understand. an example would be very appreciated also.

user31105: It's a bit unclear what you want to do with the 'd'or 'dd'in between.
You can check some functions:

strtok: which can split a string based on delimiters (in your case probably 'd'). Than you get an array of strings (e.g. for the first: { "426", "9244"}.
For each string ("426" and "9244") you use function atol to convert it into a long integer.


user7508: If all those are known tags, you can put them in the source code as
32 bit integers. No
need to convert. Or rather, let the compiler do the conversion:
const uint32_t ID_num[ARRAYSIZE] PROGMEM = {
    Oxbcc0f1c3, Ox821a7d39, Ox4924887c, ...
};

When you read a tag number in hex, in order to compare it with the known
tags, you convert it to the same type using strtoul() from
avr-libc:
uint32_t tag_id = strtoul(tag_string, NULL, 10);


49051: <p>I'm new to Arduino and my first project is an RFID reader. since I need a lot of known tags list , i have a problem with not enough memory. for that reason I want to convert strings like :  "426d9244", "1265dd39"... to a long int. I know it's been asked but as a new programer I find it hard to understand. an example would be very appreciated also.</p>
 31105: <p>It's a bit unclear what you want to do with the 'd'or 'dd'in between.</p>

<p>You can check some functions:</p>

<ol>
<li><p>strtok: which can split a string based on delimiters (in your case probably 'd'). Than you get an array of strings (e.g. for the first: { "426", "9244"}.</p></li>
<li><p>For each string ("426" and "9244") you use function atol to convert it into a long integer.</p></li>
</ol>
 7508: <p>If all those are known tags, you can put them in the source code as
32&nbsp;bit integers. No
need to convert. Or rather, let the compiler do the conversion:</p>

<pre><code>const uint32_t ID_num[ARRAYSIZE] PROGMEM = {
    Oxbcc0f1c3, Ox821a7d39, Ox4924887c, ...
};
</code></pre>

<p>When you read a tag number in hex, in order to compare it with the known
tags, you convert it to the same type using <a href="https://www.nongnu.org/avr-libc/user-manual/group__avr__stdlib.html#gaea44aa48bda8261f794dcb2d1e7ab2b2" rel="nofollow noreferrer"><code>strtoul()</code> from
avr-libc</a>:</p>

<pre><code>uint32_t tag_id = strtoul(tag_string, NULL, 10);
</code></pre>
