Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9024

Re: how to compare left 2 and right 2 characters

$
0
0

Hello,

one small code :

let you want to compare char of LV_str = 'kapilgoyal".

Calculate the length of LV_Str using strlen() into lv_len.

 

lv_str+0(1) will give you first left most char..

lv_str+1(1) will give you 2nd left most.

lv_str+ lv_len-1(1) last right most char.

lv_str+lv_len-2(1) 2nd last right char.

 

 

you can do the same thing in loop also... like assign some data in lv_loop and use it like this.

 

lv_str+lv_len-lv_loop(1)

 

just use if statement


Viewing all articles
Browse latest Browse all 9024

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>