-
Why does NULL count as 4 characters in Salesforce Apex?
If I execute the block of code in the Anonymous window, it returns 8 as the length of the string. Do null string count towards the string length in Apex?
String s = 'Yosh';
String e = null;
String y = s + e;
System.Debug(y.trim().length()); //Returns 8 characters. Should return 4-
This discussion was modified 6 years, 6 months ago by
Yogesh.
-
This discussion was modified 6 years, 6 months ago by
Forcetalks.
-
This discussion was modified 6 years, 6 months ago by
Log In to reply.
Popular Salesforce Blogs
Salesforce Twilio Integration: A Guide for Easy Integration
In this era, smartphones created a new revolution. It brings a novel approach to our communication habits. Today SMS is a valuable tool for sending…
How Salesforce Pardot AI Boosts Email Engagement? | Learn Here
Email marketing is getting more and more competitive with businesses looking to improve their email marketing by increasing the click-through rate (CTR) and conversions. While…
Popular Salesforce Videos
How to Become a Salesforce Developer? No Programming Experience Needed
Salesforce Developer has once again been named one of the world's best jobs. In a list of 25 job roles, Salesforce was the only company…
How to use Einstein Engagement Scoring in Salesforce Marketing Cloud
Cameron Robert shows how to gain actionable insights from the Einstein Engagement Scoring Dashboard in Salesforce Marketing Cloud, and talks through a few activity ideas…
How to Create a Free Developer Account in Salesforce?
There are many ways of creating a Salesforce account without investing a single rupee or a dollar with the developer’s edition and working on the…