Top "Tostring" questions

"toString" or "ToString" is a major formatting method or function used in high level programming languages.

toString(), equals(), and hashCode() in an interface

So, I have an interface with a bunch of methods that need to be implemented, the method names are irrelevant. …

java interface equals hashcode tostring
Laravel Error: Method Illuminate\View\View::__toString() must not throw an exception

Have you seen this lovely error while working in Laravel? Method Illuminate\View\View::__toString() must not throw an exception …

php laravel runtime-error tostring render-to-string
Using Google Guava's Objects.ToStringHelper

I used ToStringBuilder.reflectionToString(class) in commons-lang, to implement toString() for simple DTOs. Now I'm trying to use Google Guava …

java guava tostring
How make toString() method return Super Class private fields also along with its instance fields?

Is there a way to make toString() include private fields of the super class? I tried adding a super.toString(), …

java eclipse inheritance tostring auto-generate
Create string from HTMLDivElement

What I would like to be able to do is create a string from a Javascript HTMLElement Object. For example: …

javascript arrays string tostring
toString override in C++

In Java, when a class overrides .toString() and you do System.out.println() it will use that. class MyObj { public …

c++ tostring
how to add spaces between array items javascript

I am a beginner at javascript so I appreciate any help/advice given. My issue here is that I'm trying …

javascript arrays list split tostring
How do I automatically display all properties of a class and their values in a string?

Imagine a class with many public properties. For some reason, it is impossible to refactor this class into smaller subclasses. …

c# .net properties tostring
Calling toString on a javascript function returns source code

I just found out that when you call toString() on a javascript function, as in myFunction.toString(), the source code …

javascript tostring
How do I format a number with commas?

int a = 10000000; a.ToString(); How do I make the output? 10,000,000

c# numbers tostring