Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

strlen( ) function issue

Former Member
0 Likes
1,974

hi

i use strlen function to get string length.

but some time the strlen can't work when the string contain unicode char.

so when i write field+0(len) can't show all information.

how to get right length?

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
1,042

Hi,

Function STRLEN only works with character-type fields and returns the length in characters. The new function XSTRLEN finds the length of byte strings.

aRs

2 REPLIES 2
Read only

Former Member
0 Likes
1,042

Use STRING data type in STRLEN and also check your program attributes with "Unicode checks active" is checked.

Read only

former_member194669
Active Contributor
0 Likes
1,043

Hi,

Function STRLEN only works with character-type fields and returns the length in characters. The new function XSTRLEN finds the length of byte strings.

aRs