How to change the order of characters in a string and ascii2hex

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change the order of characters in a string and ascii2hex

xaled

Hello,

 

I have a question and a feature idea.

 

What is the best way to change the order of characters in a string?

I have a string “12345” and I want to get “21435”

 

It would be nice to have ascii2hex in addition to dec2hex

 

Thanks,

xaled


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to change the order of characters in a string and ascii2hex

Razvan Crainea-3
Hi, Xaled!

This might be interesting - if you need this feature, please open a new feature request on our issue tracker[1] so we can centralize everyting.

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 05/16/2017 08:35 PM, xaled wrote:

Hello,

 

I have a question and a feature idea.

 

What is the best way to change the order of characters in a string?

I have a string “12345” and I want to get “21435”

 

It would be nice to have ascii2hex in addition to dec2hex

 

Thanks,

xaled



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to change the order of characters in a string and ascii2hex

xaled

Hi Răzvan

 

What feature do you mean – changing the order of characters in a string, or ascii2hex?

 

I found s.encode.hexa that does what I meant with ascii2hex.

 

I actually thought about an existing functionality a la reg expression for changing the order of characters.

If It is not possible to do with existing functionality I will open a feature.

 

Thanks,

xaled

 

From: Users [mailto:[hidden email]] On Behalf Of Razvan Crainea
Sent: Mittwoch, 17. Mai 2017 10:59
To: [hidden email]
Subject: Re: [OpenSIPS-Users] How to change the order of characters in a string and ascii2hex

 

Hi, Xaled!

This might be interesting - if you need this feature, please open a new feature request on our issue tracker[1] so we can centralize everyting.

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,


Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 05/16/2017 08:35 PM, xaled wrote:

Hello,

 

I have a question and a feature idea.

 

What is the best way to change the order of characters in a string?

I have a string “12345” and I want to get “21435”

 

It would be nice to have ascii2hex in addition to dec2hex

 

Thanks,

xaled




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to change the order of characters in a string and ascii2hex

Razvan Crainea-3
Hello!

Yes, I was talking about the order of characters.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 05/17/2017 04:06 PM, xaled wrote:

Hi Răzvan

 

What feature do you mean – changing the order of characters in a string, or ascii2hex?

 

I found s.encode.hexa that does what I meant with ascii2hex.

 

I actually thought about an existing functionality a la reg expression for changing the order of characters.

If It is not possible to do with existing functionality I will open a feature.

 

Thanks,

xaled

 

From: Users [[hidden email]] On Behalf Of Razvan Crainea
Sent: Mittwoch, 17. Mai 2017 10:59
To: [hidden email]
Subject: Re: [OpenSIPS-Users] How to change the order of characters in a string and ascii2hex

 

Hi, Xaled!

This might be interesting - if you need this feature, please open a new feature request on our issue tracker[1] so we can centralize everyting.

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,


Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 05/16/2017 08:35 PM, xaled wrote:

Hello,

 

I have a question and a feature idea.

 

What is the best way to change the order of characters in a string?

I have a string “12345” and I want to get “21435”

 

It would be nice to have ascii2hex in addition to dec2hex

 

Thanks,

xaled




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to change the order of characters in a string and ascii2hex

xaled

Hello Răzvan,

 

Ok, just opened an issue.

 

Another good thing would be the possibility to access a specific character in a string.

 

Something like:

 

$var(str) = "123456";

xlog("first character: $var(str)[0] second character: $var(str)[1] ");

 

Greetings,

xaled

From: Users [mailto:[hidden email]] On Behalf Of Razvan Crainea
Sent: Mittwoch, 17. Mai 2017 16:47
To: [hidden email]
Subject: Re: [OpenSIPS-Users] How to change the order of characters in a string and ascii2hex

 

Hello!

Yes, I was talking about the order of characters.

Best regards,


Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 05/17/2017 04:06 PM, xaled wrote:

Hi Răzvan

 

What feature do you mean – changing the order of characters in a string, or ascii2hex?

 

I found s.encode.hexa that does what I meant with ascii2hex.

 

I actually thought about an existing functionality a la reg expression for changing the order of characters.

If It is not possible to do with existing functionality I will open a feature.

 

Thanks,

xaled

 

From: Users [[hidden email]] On Behalf Of Razvan Crainea
Sent: Mittwoch, 17. Mai 2017 10:59
To: [hidden email]
Subject: Re: [OpenSIPS-Users] How to change the order of characters in a string and ascii2hex

 

Hi, Xaled!

This might be interesting - if you need this feature, please open a new feature request on our issue tracker[1] so we can centralize everyting.

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,



Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 05/16/2017 08:35 PM, xaled wrote:

Hello,

 

I have a question and a feature idea.

 

What is the best way to change the order of characters in a string?

I have a string “12345” and I want to get “21435”

 

It would be nice to have ascii2hex in addition to dec2hex

 

Thanks,

xaled





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to change the order of characters in a string and ascii2hex

Razvan Crainea-3
Add a feature request for this as well :).

Cheers,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 05/17/2017 06:11 PM, xaled wrote:

Hello Răzvan,

 

Ok, just opened an issue.

 

Another good thing would be the possibility to access a specific character in a string.

 

Something like:

 

$var(str) = "123456";

xlog("first character: $var(str)[0] second character: $var(str)[1] ");

 

Greetings,

xaled

From: Users [[hidden email]] On Behalf Of Razvan Crainea
Sent: Mittwoch, 17. Mai 2017 16:47
To: [hidden email]
Subject: Re: [OpenSIPS-Users] How to change the order of characters in a string and ascii2hex

 

Hello!

Yes, I was talking about the order of characters.

Best regards,


Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 05/17/2017 04:06 PM, xaled wrote:

Hi Răzvan

 

What feature do you mean – changing the order of characters in a string, or ascii2hex?

 

I found s.encode.hexa that does what I meant with ascii2hex.

 

I actually thought about an existing functionality a la reg expression for changing the order of characters.

If It is not possible to do with existing functionality I will open a feature.

 

Thanks,

xaled

 

From: Users [[hidden email]] On Behalf Of Razvan Crainea
Sent: Mittwoch, 17. Mai 2017 10:59
To: [hidden email]
Subject: Re: [OpenSIPS-Users] How to change the order of characters in a string and ascii2hex

 

Hi, Xaled!

This might be interesting - if you need this feature, please open a new feature request on our issue tracker[1] so we can centralize everyting.

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,



Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 05/16/2017 08:35 PM, xaled wrote:

Hello,

 

I have a question and a feature idea.

 

What is the best way to change the order of characters in a string?

I have a string “12345” and I want to get “21435”

 

It would be nice to have ascii2hex in addition to dec2hex

 

Thanks,

xaled





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users