California Codes, Code of Civil Procedure - CCP, Part 2 — Of Civil Actions, Title 14 — Of Miscellaneous Provisions, Chapter 6 — Of Costs, Section 1032
(a) As used in this section, unless the context clearly requires otherwise:
(1) “Complaint” includes a cross-complaint.
(2) “Defendant” includes a cross-defendant, a person against whom a complaint is filed, or a party who files an answer in intervention.
(3) “Plaintiff” includes a cross-complainant or a party who files a complaint in intervention.
(4) “Prevailing party” includes the party with a net monetary recovery, a defendant in whose favor a dismissal is entered, a defendant where neither plaintiff nor defendant obtains any relief, and a defendant as against those plaintiffs who do not recover any relief against that defendant. If any party recovers other than monetary relief and in situations other than as specified, the “prevailing party” shall be as determined by the court, and under those circumstances, the court, in its discretion, may allow costs or not and, if allowed, may apportion costs between the parties on the same or adverse sides pursuant to rules adopted under Section 1034.
(b) Except as otherwise expressly provided by statute, a prevailing party is entitled as a matter of right to recover costs in any action or proceeding.
(c) Nothing in this section shall prohibit parties from stipulating to alternative procedures for awarding costs in the litigation pursuant to rules adopted under Section 1034.
Notes
Defines complaint, defendant, plaintiff, and prevailing party for cost purposes, including specified cross-parties and intervention parties, and identifies categories entitled to prevailing-party status. Requires prevailing-party costs as of right unless another statute expressly provides otherwise, while allowing court discretion for other relief situations and permitting party stipulations to alternative cost-award procedures.
Use as reference
Lexinter.net | California Code, Code of Civil Procedure - CCP § 1032 | https://laws.lexinter.net/codes/california/code-of-civil-procedure/part-2/title-14/chapter-6/section-1032