Answers for "string size"

13

java get screen size

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

// the screen height
screenSize.getHeight();

// the screen width
screenSize.getWidth();
Posted by: Guest on July-07-2020
1

php limit string length

if (strlen($str) > 10)
   $str = substr($str, 0, 7) . '...';
Posted by: Guest on July-17-2020
0

c++ string size

// string::size
#include <iostream>
#include <string>

int main ()
{
  std::string str ("Test string");
  std::cout << "The size of str is " << str.size() << " bytes.\n";
  return 0;
}
Posted by: Guest on February-03-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language