1. Check key in a dictionary
PHP : "key" in obj
Python : if "key1" in d:
Java : hashMap.containsKey("bb")
2. Split string
PHP : list($encrypted_data, $iv, $ivh) = explode('::', base64_decode($garble), 2);
Python : metas = resp.content.split('/')
Java : String[] tokens = str.split(":");
3. Check variable is null/undefined
JS : if( var === undefined )
沒有留言:
張貼留言