About 7,450,000 results
Open links in new tab
  1. Java: how to initialize String []? - Stack Overflow

    7 String[] errorSoon = new String[n]; With n being how many strings it needs to hold. You can do that in the declaration, or do it without the String [] later on, so long as it's before you try use …

  2. c# - What's does the dollar sign ($"string") do? - Stack Overflow

    C# string interpolation is a method of concatenating,formatting and manipulating strings. This feature was introduced in C# 6.0. Using string interpolation, we can use objects and …

  3. How do I compare strings in Java? - Stack Overflow

    Apr 2, 2013 · String Literals: Moreover, a string literal always refers to the same instance of class String. This is because string literals - or, more generally, strings that are the values of …

  4. javascript - What does [object Object] mean? - Stack Overflow

    String.prototype.sampleProperty = 5; var str = "this is a string"; str.sampleProperty; // 5 By this means primitives have access to all the properties (including methods) defined by their …

  5. Reverse string: string[::-1] works, but string[0::-1] and others don't

    Feb 7, 2014 · For string[0::-1], it's because you tell Python to start at index 0 and go backwards. Of course it doesn't reverse the string. You should do string[len(string)-1::-1] (or surprisingly …

  6. c# - Why would you use String.Equals over ==? - Stack Overflow

    Nov 2, 2009 · I recently was introduced to a large codebase and noticed all string comparisons are done using String.Equals() instead of == What's the reason for this, do you think?

  7. c++ - identifier "string" undefined? - Stack Overflow

    11 Because string is defined in the namespace std. Replace string with std::string, or add using std::string; below your include lines. It probably works in main.cpp because some other header …

  8. How to fix "SyntaxWarning: invalid escape sequence" in Python?

    It's important to remember that a string literal is still a string literal even if that string is intended to be used as a regular expression. Python's regular expression syntax supports many special …

  9. How can you encode/decode a string to Base64 in JavaScript?

    btoa() accepts a “string” where each character represents an 8-bit byte – if you pass a string containing characters that can’t be represented in 8 bits, it will probably break. This isn’t a …

  10. c# - What does $ mean before a string? - Stack Overflow

    You can use an interpolated string anywhere you can use a string literal. When running your program would execute the code with the interpolated string literal, the code computes a new …